Help me in solving EQUALCOIN problem

My issue

t = int(input())

while t > 0:
n = input().split(" ")
x = int(n[0])
y = int(n[1])

if (x % 2 == 0 and y % 2 != 0) or (x == 0 and y % 2 == 0) or (x % 2 == 0 and y == 0) or (x % 2 == 0 and y % 2 == 0):
    print("Yes")
else:
    print("No")
t -= 1

That’s my code, and I don’t think their is any issue in my logic and so in my code, then why my code isn’t being accepted???

My code

t = int(input())

while t > 0:
    n = input().split(" ")
    x = int(n[0])
    y = int(n[1])
    
    if (x % 2 == 0 and y % 2 != 0) or (x == 0 and y % 2 == 0) or (x % 2 == 0 and y == 0) or (x % 2 == 0 and y % 2 == 0):
        print("Yes")
    else:
        print("No")
    t -= 1

Problem Link: EQUALCOIN Problem - CodeChef

class Codechef
{
public static void main (String args) throws java.lang.Exception
{Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t–>0){
int x=sc.nextInt();
int y=sc.nextInt();
if((x+2*y)%2!=0 || (y%2!=0 && x<2))
System.out.println(“no”);
else
System.out.println(“yes”);
}

}

}

t = int(input("Enter number of test cases: "))

for _ in range(t):
n = input("Enter two numbers separated by a space: “).split(” ")
x = int(n[0])
y = int(n[1])

if (x % 2 == 0 and y % 2 != 0) or (x == 0 and y % 2 == 0) or (x % 2 == 0 and y == 0) or (x % 2 == 0 and y % 2 == 0):
    print("Yes")
else:
    print("No")