Help me in solving CHEFPATH problem

My issue

Why my code is failing eventhough I have taken all the edge cases too.

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here |a-c|+|b-d|=1
	int t;
	cin>>t;
	for (int i=0;i<t;i++)
	{
	   long long int x,y;
	    cin>>x>>y;
	  if (x==2&&y==1)
	  {
	      
	  cout <<"YES"<<endl;
	  continue;
	  }
	  if (x==1&&y==2)
	  {
	      
	  cout <<"Yes"<<endl;
	  continue;
	  }
	  
	  
	    if ((x!=1&&y!=1)&&((x%2==0)||(y%2==0)))
	    cout <<"Yes"<<endl;
	    else {
	        cout <<"No"<<endl;
	    }
	    
	}
}

Problem Link: Chef And Magical Path Practice Coding Problem