Chef has two integers A and B. In one operation he can choose any integer d, and make one of the following two moves :
Add d to A and subtract d from B.
Add d to B and subtract d from A.

Chef is allowed to make as many operations as he wants. Can he make A and B equal?

------ Input Format ------ 

- First line will contain T, number of test cases. Then the test cases follow.
- Each test case contains of a single line of input, two integers A, B.

------ Output Format ------ 

For each test case, if Chef can make the two numbers equal print YES else print NO.

You may print each character of the string in uppercase or lowercase (for example, the strings yEs, Yes, YeS, and YES will all be treated as identical).

------ Constraints ------ 

$1 ≤ T ≤ 1000$
$1 ≤ A,B ≤ 1000$

----- Sample Input 1 ------ 
2
3 3
1 2

----- Sample Output 1 ------ 
Yes
No

----- explanation 1 ------ 
Test case $1$: Since $A$ and $B$ are already equal, Chef does not need any operations.

Test case $2$: It can be shown that $A$ and $B$ can never be made equal using any number of given operations.

Source: codechef | Difficulty: EASY
Tags: Constructive algorithms

Mathematics

Ad-hoc


Solutions:
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a == b:
		print('Yes')
	elif (a + b) % 2 == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	diff = a - b
	if diff % 2 == 0:
		print('Yes')
	else:
		print('No')


for j in range(int(input())):
	(x, y) = map(int, input().split())
	if x == y:
		print('Yes')
	elif (x - y) % 2 == 0 or (y - x) % 2 == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	s = input().split()
	c = abs(int(s[0]) - int(s[1]))
	if c % 2 == 0:
		print('Yes')
	else:
		print('No')


import math
test_case = int(input())
for i in range(test_case):
	(a, b) = map(int, input().split())
	if a == b:
		print('Yes')
	elif abs(a - b) % 2 == 0:
		print('Yes')
	else:
		print('No')


T = int(input())
for i in range(T):
	(K, X) = [int(i) for i in input().split()]
	if K == X:
		print('Yes')
	elif abs(K - X) % 2 == 0:
		print('YES')
	else:
		print('No')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	if (a + b) % 2 == True:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if abs(a - b) % 2 == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	s = input()
	l = [int(i) for i in s.split()]
	(a, b) = (l[0], l[1])
	if a == b:
		print('Yes')
	elif (a - b) % 2 == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	(A, B) = map(int, input().split())
	if A < B:
		(A, B) = (B, A)
	diff = A - B
	if diff % 2 == 0:
		d = diff // 2
		A -= d
		B += d
		print('Yes')
	else:
		print('No')
	t -= 1


n = int(input())
while n:
	ip = input().split()
	l = [int(j) for j in ip]
	c = l[0] - l[1]
	if c % 2 == 0:
		print('Yes')
	else:
		print('No')
	n -= 1


t = int(input())
for i in range(t):
	n = input()
	l = [i for i in n.split()]
	if int(l[0]) == int(l[1]):
		print('Yes')
	elif (int(l[0]) - int(l[1])) % 2 == 0:
		print('Yes')
	else:
		print('No')


T = int(input())
for i in range(T):
	(A, B) = map(int, input().split())
	C = A - B
	if C % 2 == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	c = a - b
	if c % 2 == 0:
		print('Yes')
	else:
		print('No')
	t -= 1