“I am not in danger, Skyler. I am the danger. A guy opens his door and gets shot, and you think that of me? No! I am the one who knocks!”
Skyler fears Walter and ponders escaping to Colorado. Walter wants to clean his lab as soon as possible and then go back home to his wife. 
In order clean his lab, he has to achieve cleaning level of lab as $Y$. The current cleaning level of the lab is $X$. 
He must choose one positive odd integer $a$ and one positive even integer $b$. Note that, he cannot change $a$ or $b$ once he starts cleaning.
He can perform any one of the following operations for one round of cleaning:  
- Replace $X$ with $X+a$.  
- Replace $X$ with $X-b$.
Find minimum number of rounds (possibly zero) to make lab clean.

-----Input:-----
- First line will contain $T$, number of test cases. $T$ testcases follow :  
- Each test case contains two space separated integers $X, Y$. 

-----Output:-----
For each test case, output an integer denoting minimum number of rounds to clean the lab.

-----Constraints-----
- $1 \leq T \leq 10^5$
- $ |X|,|Y| \leq 10^9$

-----Sample Input:-----
3
0 5
4 -5
0 10000001

-----Sample Output:-----
1
2
1

-----EXPLANATION:-----
- 
For the first testcase, you can convert $X$ to $Y$  by choosing $a=5$ and $b=2$.

It will cost minimum of $1$ cleaning round. You can select any other combination of $a, b$ satisfying above condition but will take minimum of $1$ cleaning round in any case.
- 
For the second testcase, you can convert $X$ to $Y$ by choosing $a=1$ and $b=10$. In first round they will replace $X$ to $X+a$ and then in second round replace to $X-b$. You can perform only one operation in one round.

Difficulty: interview

Starter code:

Solutions:
t=int(input())
for i in range(t):
 ans=0
 x,y=list(map(int,input().split()))
 if y>x:
  if (y-x)%4==0:ans=3
  elif (y-x)%2==0: ans=2
  else: ans=1
 if y<x:
  if (y-x)%2==0:ans=1
  else: ans=2
 print(ans)


# cook your dish here
for _ in range(int(input())):
 x,y = map(int,input().split())
 if x == y:
  print(0)
 elif x > y:
  if (x-y)%2==0:
   print(1)
  else:
   print(2)
 else:
  if (y-x)%4 == 0:
   print(3)
  elif (y-x)%2 == 0:
   print(2)
  else:
   print(1)

for _ in range(int(input())):
 x,y = map(int,input().split())
 if x == y:
  print(0)
 elif x > y:
  if (x-y)%2==0:
   print(1)
  else:
   print(2)
 else:
  if (y-x)%4 == 0:
   print(3)
  elif (y-x)%2 == 0:
   print(2)
  else:
   print(1)

for _ in range(int(input())):
 # k=int(input())
 a,b=[int(x) for x in input().split()]
 if a==b:
  print(0)
 else:
  if b>a:
   c=b-a
   if c%2!=0:
    print(1)
   else:
    c=c//2
    if c%2==0:
     print(3)
    else:
     print(2)
  else:
   c=a-b
   if c%2!=0:
    print(2)
   else:
    print(1)

# import math
# import sys
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')

for _ in range(int(input())):
 # k=int(input())
 a,b=[int(x) for x in input().split()]
 if a==b:
  print(0)
 else:
  if b>a:
   c=b-a
   if c%2!=0:
    print(1)
   else:
    c=c//2
    if c%2==0:
     print(3)
    else:
     print(2)
  else:
   c=a-b
   if c%2!=0:
    print(2)
   else:
    print(1)

for i in range(int(input())):
 x,y=list(map(int,input().split()))
 if y>x:
  if (x-y)%4==0:
   print("3")
  elif (x-y)%2==0:
   print("2")
  else:
   print("1")
 elif x>y:
  if (y-x)%2==0:
   print("1")
  else:
   print("2")
 else:
  print("0")
 


# cook your dish here
for testcases in range(int(input())):
 x,y=map(int,input("").split())
 z=y-x
 if(z==0):
  print(0)
 elif(z>0):
  if(z%2==0):
   z/=2
   if(z%2==0):
    print(3)
   else:
    print(2)
  else:
   print(1)
 else:
  if(z%2==0):
   print(1)
  else:
   print(2)

t=int(input())
for each in range(t):
 x,y=map(int,input().split())
 if x>y:
  if (x-y)%2==0:
   print("1")
  else:
   print("2")
 elif x<y:
  if (y-x)%2!=0:
   print("1")
  elif (y-x)%2==0 and (y-x)%4!=0:
   print("2")
  else:
   print("3")
 else:
  print("0")

t=int(input())
for each in range(t):
 x,y=map(int,input().split())
 if x>y:
  if (x-y)%2==0:
   print("1")
  else:
   print("2")
 elif x<y:
  if (y-x)%2!=0:
   print("1")
  elif (y-x)%2==0 and (y-x)%4!=0:
   print("2")
  else:
   print("3")
 else:
  print("0")

# cook your dish here
t=int(input())
for _ in range(t):
 x,y=list(map(int,input().split()))
 if(x>y):
  if(abs(x-y)%2==0):
   print(1)
  else:
   print(2)
 elif(x<y):
  if(abs(x-y)%2!=0):
   print(1)
  elif(abs(x-y)%2==0 and abs(x-y)%4!=0):
   print(2)
  else:
   print(3)
 else:
  print(0)

test_case = int(input())

while test_case > 0:
 x, y = list(map(int, input().split(' ')))
 difference = abs(x - y)
 ans = 0
 if x > y:
  if difference % 2 == 0:
   ans = 1
  else:
   ans = 2
 elif x < y:
  if difference % 2 == 0 and difference % 4 != 0:
   ans = 2
  elif difference % 2 == 1:
   ans = 1
  else:
   ans = 3
 elif x == y:
  ans = 0
 print(ans)
 test_case -= 1


# cook your dish here
try:
 for t in range(int(input())):
  x,u = map(int,input().split())
  if(x==u):
   print(0)
  elif(u>x):
   if(abs(u-x)%2==0):
    if(abs(u-x)%4==0):
     print(3)
    else:
     print(2)
   else:
    print(1)
  else:
   if(abs(x-u)%2!=0):
    print(2)
   else:
    print(1)




except EOFError as e:
 pass

# cook your dish here
try:
 for t in range(int(input())):
  x,u = map(int,input().split())
  if(x==u):
   print(0)
  elif(u>x):
   if(abs(u-x)%2==0):
    if(abs(u-x)%4==0):
     print(3)
    else:
     print(2)
   else:
    print(1)
  else:
   if(abs(x-u)%2!=0):
    print(2)
   else:
    print(1)




except EOFError as e:
 pass

try:
 for t in range(int(input())):
  x,u = list(map(int,input().split()))
  if(x==u):
   print(0)
  elif(u>x):
   if(abs(u-x)%2==0):
    if(abs(u-x)%4==0):
     print(3)
    else:
     print(2)
   else:
    print(1)
  else:
   if(abs(x-u)%2!=0):
    print(2)
   else:
    print(1)




except EOFError as e:
 pass


try:
 t=int(input())
 while(t):
  x,y=input().split()
  x=int(x)
  y=int(y)
  if x==y:
   print(0)
  elif (x<y and (y-x)%2==1)or (x>y and (x-y)%2==0):
   print(1)
  elif x<y and (y-x)%4==0:
   print(3)
  elif x>y and (x-y)%2==1 or x<y and (y-x)%2==0:
   print(2)
  t-=1
except:
 pass

for t in range(int(input())):
 x,y = map(int, input().split())
 z=x-y
 if x > y:
  if z % 2 == 0:print(1)
  else:print(2)
 elif x < y:
  if z % 2 != 0:print(1)
  elif z % 4 == 0:print(3)
  else:print(2)
 else:print(0)

t=int(input())
for i in range(t):
 w,m=list(map(int,input().split()))
 d=w-m
 if(w>m):
  if(d%2==0):
   print(1)
  else:
   print(2)
 elif(w<m):
  if(d%2!=0):
   print(1)
  elif(d%4==0):
   print(3)
  else:
   print(2)
 else:
  print(0)



def check(x,y,count):
 if x == y:
  print(count)
for i in range(int(input())):
 count = 0
 x,y = list(map(int, input().split()))
 diff = x-y
 if diff > 0:
  if diff%2==0:
   x = x - diff
   count+=1
   check(x,y,count)
  else:
   x = x - (diff+1)
   count+=1
   x = x + 1
   count+=1
   check(x,y,count)
 elif diff == 0:
  print("0")
 else:
  diff = abs(diff)
  if diff%2!=0:
   x = x + diff
   count+=1
   check(x,y,count)
  elif diff%4==0:
   x = x + (diff+1)
   count+=1
   x = x - (diff+2)
   count+=1
   x = x + (diff+1)
   count+=1
   check(x,y,count)
  else:
   a = diff/2
   x = x + a
   count+=1
   x = x + a
   count+=1
   check(x,y,count)


for _ in range(int(input())):
 x,y=list(map(int,input().split()))
 if y-x==0:
  print(0)
  continue
 if y-x>0:
  if (y-x)%2:
   print(1)
   continue
  if not (y-x)%2 and (y-x)%4:
   print(2)
   continue
  else:
   print(3)
   continue
 if y-x<0:
  if (y-x)%2:
   print(2)
   continue
  else:
   print(1)
   continue


list=[]
for i in range(int(input())):
 X,Y=map(int,input().split())
 x=Y-X
 op=0
 if x==0:
  op=0
 elif x>0:
  if x%2!=0:
   op=1
  elif x%4==0:
   op=3
  else:
   op=2
 elif x<0:
  if x%2!=0:
   op=2
  else:
   op=1
 list.append(op)
for l in list:
 print(l)

# cook your dish here
T=int(input())
for _ in range(T):
 X,Y=map(int,input().split())
 diff=abs(X-Y)
 if(X>Y):
  if (diff%2==0):
   ans=1
  else:
   ans=2
   
 elif (X<Y):
  if (diff%2!=0):
   ans=1

  elif (diff%4==0):
   ans=3

  else:
   ans=2

 else:
  ans=0

 print(ans)

n=int(input())
while(n>0):
 a,b=list(map(int,input().split()))
 if b-a==0 :
  print(0)
 elif b-a>0 :
  if (b-a)%2 :
   print(1)
  elif (b-a)%2==0 and (b-a)%4 :
   print(2)
  else:
   print(3)
 else:
  if (b-a)%2:
   print(2)
  else :
   print(1)
 n-=1





for _ in range(int(input())):
 x,y=list(map(int,input().split()))
 if y-x==0:
  print(0)
  continue
 if y-x>0:
  if (y-x)%2:
   print(1)
   continue
  if not (y-x)%2 and (y-x)%4:
   print(2)
   continue
  else:
   print(3)
   continue
 if y-x<0:
  if (y-x)%2:
   print(2)
   continue
  else:
   print(1)
   continue


t=int(input())
for i in range(t):
 w,m=list(map(int,input().split()))
 d=w-m
 if(w>m):
  if(d%2==0):
   print(1)
  else:
   print(2)
 elif(w<m):
  if(d%2!=0):
   print(1)
  elif(d%4==0):
   print(3)
  else:
   print(2)
 else:
  print(0)



t=int(input())
for i in range(t):
 w,m=list(map(int,input().split()))
 d=w-m
 if(w>m):
  if(d%2==0):
   print(1)
  else:
   print(2)
 elif(w<m):
  if(d%2!=0):
   print(1)
  elif(d%4==0):
   print(3)
  else:
   print(2)
 else:
  print(0)