25 lines
396 B
Python
25 lines
396 B
Python
[r1, c1, r2, c2] = [int(i) for i in input().split()]
|
|
|
|
def tower():
|
|
s = 0
|
|
if r1 != r2:
|
|
s += 1
|
|
if c1 != c2:
|
|
s += 1
|
|
return s
|
|
|
|
|
|
def rook():
|
|
if ((r1+c1)%2 != (r2+c2)%2) or (r1, c1)==(r2, c2):
|
|
return 0
|
|
|
|
s = 1
|
|
if abs(r2-r1) != abs(c2-c1):
|
|
s += 1
|
|
return s
|
|
|
|
def king():
|
|
return max(abs(r2-r1), abs(c2-c1))
|
|
|
|
|
|
print(tower(), rook(), king()) |