Ada's classroom contains $N \cdot M$ tables distributed in a grid with $N$ rows and $M$ columns. Each table is occupied by exactly one student.
Before starting the class, the teacher decided to shuffle the students a bit. After the shuffling, each table should be occupied by exactly one student again. In addition, each student should occupy a table that is adjacent to that student's original table, i.e. immediately to the left, right, top or bottom of that table.
Is it possible for the students to shuffle while satisfying all conditions of the teacher?

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first and only line of each test case contains two space-separated integers $N$ and $M$.

-----Output-----
For each test case, print a single line containing the string "YES" if it is possible to satisfy the conditions of the teacher or "NO" otherwise (without quotes).

-----Constraints-----
- $1 \le T \le 5,000$
- $2 \le N, M \le 50$

-----Example Input-----
2
3 3
4 4

-----Example Output-----
NO
YES

-----Explanation-----
Example case 2: The arrows in the following image depict how the students moved.

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
t = int(input())
for _ in range(t):
	(N, M) = map(int, input().split())
	if N % 2 == 0 or M % 2 == 0:
		print('YES')
	else:
		print('NO')


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


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	if n * m % 2 == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x % 2 == 0 or y % 2 == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(x, y) = list(map(int, input().split()))
	print('NO' if x * y % 2 else 'YES')


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


for i in range(int(input())):
	(n, k) = map(int, input().split())
	isproductsatisfied = n * k % 2 == 0
	print('YES' if isproductsatisfied else 'NO')


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())
for _ in range(int(input())):
	(a, b) = rinput()
	if a & 1 and b & 1:
		print('NO')
	else:
		print('YES')


def isOdd(n):
	return True if n % 2 != 0 else False

def isPossible(a, b):
	return 'NO' if isOdd(a) and isOdd(b) else 'YES'

def __starting_point():
	t = int(input())
	for i in range(t):
		(a, b) = map(int, input().split())
		print(isPossible(a, b))
__starting_point()


t = int(input())
for i in range(t):
	(n, m) = map(int, input().split())
	if n % 2 != 0 and m % 2 != 0:
		print('NO')
	else:
		print('YES')