tc = int(input())
for i in range(tc):
    x, y = list(map(int, input().strip().split()))
    if x % 2 == 0:
        if x == 0 and y % 2 != 0:
            print("NO")
        else:
            print("YES")
    else:
        print("NO")
9bb5650f46b3b6ad06ce207619dcee506e586ebc
<mask token>

<mask token>
for i in range(tc):
    x, y = list(map(int, input().strip().split()))
    if x % 2 == 0:
        if x == 0 and y % 2 != 0:
            print('NO')
        else:
            print('YES')
    else:
        print('NO')

tc = int(input())
for i in range(tc):
    x, y = list(map(int, input().strip().split()))
    if x % 2 == 0:
        if x == 0 and y % 2 != 0:
            print('NO')
        else:
            print('YES')
    else:
        print('NO')

tc = int(input())
for i in range(tc):
    x, y = list(map(int, input().strip().split()))
    if x % 2 == 0:
        if x == 0 and y % 2 != 0:
            print("NO")
        else:
            print("YES")
    else:
        print("NO")