Chef is stuck in a two dimensional maze having N rows and M columns. He needs to get out of the maze as soon as possible and arrive at the kitchen in order to serve his hungry customers. But, he can get out of the maze only if he is able to successfully find any magical path in the given maze.

A path is defined as magical if it starts from any of the cell (a,b) of the maze and ends at the cell (c,d) such that the following conditions are satisfied :-
- |a - c| + |b - d| = 1
- All the cells in the maze are traversed exactly once.
- It is allowed to move only in the four directions - up, down, left and right from the current cell.

-----Input-----
- First line of the input contains an integer T denoting the number of different types of scenarios.
- Each of the next T lines will contain two integers N, M denoting the dimensions of the maze.

-----Output-----
For each of the T scenarios, output a single line containing "Yes" or "No" (without quotes) denoting whether the Chef can get out of the maze or not.

-----Constraints-----
- 1 ≤ T ≤ 105
- 1 ≤ N, M ≤ 1018

-----Subtasks-----
Subtask #1 : (30 points)
- 1 ≤ T ≤ 100
- 1 ≤ N, M ≤ 10

Subtask #2 : (70 points) 

Original Constraints

-----Example-----
Input:
1
2 2

Output:
Yes

-----Explanation-----
Example case 1.

Chef can start from (1,1), move down to (2,1), then move right to (2,2) and finally move upwards to reach (1,2). As, he is able to visit all the cells exactly once and sum of absolute differences of corresponding x and y dimension is 1, we can call this path a magical path.

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
t = eval(input())
for _ in range(t):
	(n, m) = list(map(int, input().split()))
	if n * m == 2:
		print('Yes')
	elif n * m % 2 == 0 and m != 1 and (n != 1):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, m) = input().strip().split()
	if n == '1' and m == '2' or (n == '2' and m == '1'):
		print('Yes')
	elif n == '1' or m == '1':
		print('No')
	elif int(n[-1]) % 2 == 0 or int(m[-1]) % 2 == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	t -= 1
	(m, n) = list(map(int, input().split()))
	if m == 1 and n > 2:
		print('No')
		continue
	elif n == 1 and m > 2:
		print('No')
		continue
	if m % 2 == 0 or n % 2 == 0:
		print('Yes')
	elif m == 1 and n == 1:
		print('No')
	else:
		print('No')


def __starting_point():
	T = int(input())
	for i in range(T):
		(N, M) = list(map(int, input().split()))
		if N == 1 and M == 2:
			print('Yes')
		elif M == 1 and N == 2:
			print('Yes')
		elif N == 1 or M == 1:
			print('No')
		elif N * M % 2 == 0:
			print('Yes')
		else:
			print('No')
__starting_point()


t = eval(input())
while t > 0:
	(a, b) = input().split(' ')
	a = int(a)
	b = int(b)
	t -= 1
	if a == 1 and b == 2:
		print('Yes')
		continue
	elif a == 2 and b == 1:
		print('Yes')
		continue
	elif a == 1 or b == 1:
		print('No')
		continue
	elif a % 2 == 0 or b % 2 == 0:
		print('Yes')
		continue
	else:
		print('No')


def checkval(m, n):
	if m == 1:
		if n == 2:
			return 1
		return 0
	if n == 1:
		if m == 2:
			return 1
		return 0
	if not n & 1 or not m & 1:
		return 1
	return 0
t = int(input())
while t:
	t -= 1
	(n, m) = input().split()
	n = int(n)
	m = int(m)
	if checkval(m, n):
		print('Yes')
	else:
		print('No')


t = int(input().strip())
while t > 0:
	t = t - 1
	(a, b) = [int(x.strip()) for x in input().split()]
	if a * b % 2 == 0 and a != 1 and (b != 1):
		print('Yes')
	elif (a == 1 or b == 1) and a * b == 2:
		print('Yes')
	else:
		print('No')


for i in range(eval(input())):
	a = list(map(int, input().split()))
	a.sort()
	if a[0] == 1 and a[1] == 2:
		print('Yes')
	elif a[0] == 1 and a[1] % 2 == 0:
		print('No')
	elif a[0] != 1 and a[1] % 2 == 0:
		print('Yes')
	elif a[0] % 2 == 0 and a[1] % 2 != 0 or (a[1] % 2 == 0 and a[0] % 2 != 0):
		print('Yes')
	else:
		print('No')


t = eval(input())
while t > 0:
	t -= 1
	(r, c) = list(map(int, input().split()))
	if r == 1 and c == 2 or (c == 1 and r == 2):
		print('Yes')
	elif r > 1 and c > 1 and (r % 2 == 0 or c % 2 == 0):
		print('Yes')
	else:
		print('No')


T = int(input())
while T > 0:
	(N, M) = list(map(int, input().split()))
	if N == 1:
		if M == 2:
			print('Yes')
		else:
			print('No')
	elif M == 1:
		if N == 2:
			print('Yes')
		else:
			print('No')
	elif N % 2 == 1 and M % 2 == 1:
		print('No')
	else:
		print('Yes')
	T = T - 1


def __starting_point():
	t = int(input())
	while t:
		l = input().split(' ')
		nl = [int(i) for i in l]
		(m, n) = nl
		if m == 1 and n > 2 or (n == 1 and m > 2):
			print('No')
		else:
			print('No' if m % 2 and n % 2 else 'Yes')
		t -= 1
__starting_point()


import sys
for i in range(int(sys.stdin.readline().strip())):
	(n, m) = list(map(int, sys.stdin.readline().strip().split()))
	if n == 1:
		if m == 2:
			print('Yes')
		else:
			print('No')
	elif m == 1:
		if n == 2:
			print('Yes')
		else:
			print('No')
	elif n * m & 1:
		print('No')
	else:
		print('Yes')


t = int(input(''))
while t:
	(a, b) = input().split(' ')
	a = int(a)
	b = int(b)
	min1 = min(a, b)
	max1 = max(a, b)
	if min1 == 1:
		if max1 == 2:
			print('Yes')
		else:
			print('No')
	elif max1 % 2 == 0 or min1 % 2 == 0:
		print('Yes')
	else:
		print('No')
	t -= 1


T = int(input())
while T > 0:
	T -= 1
	(N, M) = list(map(int, input().split(' ')))
	if N == 1 or M == 1:
		x = max(N, M)
		if x == 1:
			print('No')
		elif x == 2:
			print('Yes')
		else:
			print('No')
	elif M % 2 == 0 or N % 2 == 0:
		print('Yes')
	else:
		print('No')


def minimumchanges():
	n = int(input().strip())
	for i in range(0, n):
		(N, M) = list(map(int, input().strip().split(' ')))
		if N == 1 and M == 2 or (N == 2 and M == 1):
			print('Yes')
		elif N == 1 or M == 1:
			print('No')
		elif N % 2 == 0 or M % 2 == 0:
			print('Yes')
		else:
			print('No')
minimumchanges()


t = int(input())
for sc in range(t):
	(n, m) = list(map(int, input().split()))
	if n == 1 or m == 1:
		if n * m == 2:
			print('Yes')
		else:
			print('No')
	elif n * m % 2 == 0:
		print('Yes')
	else:
		print('No')


t = input()
t = int(t)
while t:
	(n, m) = input().split()
	n = int(n)
	m = int(m)
	if n * m == 2:
		print('Yes')
	elif n == 1 or m == 1:
		print('No')
	elif n % 2 == 0 or m % 2 == 0:
		print('Yes')
	else:
		print('No')
	t -= 1