def DeltaY(input):
input = input - 1
if down - (-1 * input) > up - input:
return -2 * (up - input)
else:
return ((-1 * input) - down) * 2 - 1
def DeltaX(input):
input = input - 1
if left - (-1 * input) > right - input:
return -2 * (right - input)
else:
return ((-1 * input) - left) * 2 - 1
up = 6
down = 19
left = 12
right = 11
print DeltaX(-3)
print DeltaY(4)