Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
- int main()
- {
- fast()
- ll t;
- cin>>t;
- while(t--)
- {
- ll a,b;
- cin>>a>>b;
- if(a==1 || b== 1)cout<<"Yes"<<endl;
- else if(a==2 && b == 2)cout<<"Yes"<<endl;
- //else if(a%2==0 && b%3==0)cout<<"Yes"<<endl;
- //else if(a%3==0 && b%2==0)cout<<"Yes"<<endl;
- else cout<<"No"<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement