Chef has two integers A and B (A ≤ B). 

Chef can choose any non-negative integer X and add them to both A and B. Find whether it is possible to make A a [divisor] of B.

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

- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of two integers A and B.

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

For each test case, output YES if it is possible to make A a factor of B, NO otherwise.

You can print each character of the string in uppercase or lowercase. For example, the strings Yes, YES, yes, and yEs, are all considered identical.

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

$1 ≤ T ≤ 10^{5}$
$1 ≤ A ≤ B ≤ 10^{9}$

----- Sample Input 1 ------ 
3
3 6
4 14
9 10

----- Sample Output 1 ------ 
YES
YES
NO

----- explanation 1 ------ 
Test case $1$: We can choose $X = 0$ and add them to $3$ and $6$. Thus, $3$ is a factor of $6$.

Test case $2$: We can choose $X = 1$ and add them to $4$ and $14$. Thus, $4+1 = 5$ is a factor of $14+1 = 15$.

Test case $3$: There is no possible value of $X$ to add such that $A$ becomes a factor of $B$.

Source: codechef | Difficulty: EASY
Tags: Mathematics


Solutions:
goals = int(input())
for i in range(goals):
	(life, wife) = map(int, input().split())
	if life <= wife // 2 or life == wife:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a <= b // 2 or a == b:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	d = b - a
	if d >= a or d == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if b - a >= b / 2:
		print('YES')
	elif b == a:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a == 0 or a == 1:
		print('YES')
		continue
	elif a == b:
		print('YES')
		continue
	if b - a >= a:
		print('YES')
	else:
		print('NO')


t = int(input())
for tc in range(t):
	(c, d) = map(int, input().split())
	a = abs(c - d)
	if a >= c or a == 0:
		print('YES')
	else:
		print('NO')


for tc in range(int(input())):
	(a, b) = map(int, input().split())
	if b % a == 0:
		print('YES')
	elif b > a:
		if b / 2 > a:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if b % a == 0:
		print('YES')
	else:
		diff = b - a
		if diff < a:
			print('NO')
		else:
			print('YES')


def solve(a, b):
	if b % a == 0:
		return 'YES'
	if b > 2 * a:
		return 'YES'
	return 'NO'
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	print(solve(a, b))


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if b - a >= a or a == b:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	arr = list(map(int, input().split()))
	if arr[1] % arr[0] == 0:
		print('YES')
	elif arr[0] <= arr[1] / 2 or arr[0] == arr[1]:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	(a, b) = map(int, input().split())
	d = b - a
	if a == b:
		print('YES')
	elif d >= a:
		print('YES')
	else:
		print('NO')
	t = t - 1


T = int(input())
for _ in range(T):
	(x, y) = map(int, input().split())
	if y % x == 0:
		print('YES')
	elif y // x > 1:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	(a, b) = map(int, input().split())
	if b % a == 0 or 2 * a <= b:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	a = [int(x) for x in input().split()]
	(x, y) = (a[0], a[1])
	if y % x == 0:
		print('YES')
	elif y // x > 1:
		print('YES')
	else:
		print('NO')


T = int(input())
for i in range(T):
	(A, B) = map(int, input().split())
	d = B - A
	if d < A and d != 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	(a, b) = input().split()
	(a, b) = (int(a), int(b))
	if a == b:
		print('YES')
	elif a * 2 <= b:
		print('YES')
	else:
		print('NO')


T = int(input())
for i in range(T):
	(a, b) = map(int, input().split())
	x = b - a
	if x < a and x != 0:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	(a, b) = map(int, input().split())
	print('YES') if a == b or b // a > 1 else print('NO')
	t -= 1


import sys
for _ in range(int(sys.stdin.readline())):
	(a, b) = map(int, sys.stdin.readline().split())
	sys.stdout.write('YES\n' if b % a == 0 else 'YES\n' if b > 2 * a else 'NO\n')


import sys
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	print('YES' if b % a == 0 else 'YES' if b > 2 * a else 'NO')


for o in range(int(input())):
	(a, b) = list(map(int, input().split()))
	if b >= 2 * a or b == a:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(n, m) = map(int, input().split())
	if m % n == 0 or m - n >= n:
		print('YES')
	else:
		print('NO')


t = int(input())
for k in range(0, t):
	(x1, x2) = list(map(int, input().split()))
	ans = x2 - x1
	if x1 <= ans or x2 % x1 == 0:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	(A, B) = map(int, input().split())
	d = B - A
	if A == B:
		print('YES')
	elif A <= d:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	R = input().split()
	S = int(R[1])
	D = int(R[0])
	if S - D >= D or S == D:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x == y or x <= y / 2:
		print('YES')
	else:
		print('NO')