Advertisement
jakaria_hossain

codeforce - puzzle pieces

May 7th, 2020
1,158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
  5. int main()
  6. {
  7.     fast()
  8.     ll t;
  9.     cin>>t;
  10.     while(t--)
  11.     {
  12.         ll a,b;
  13.         cin>>a>>b;
  14.         if(a==1 || b== 1)cout<<"Yes"<<endl;
  15.         else if(a==2 && b == 2)cout<<"Yes"<<endl;
  16.         //else if(a%2==0 && b%3==0)cout<<"Yes"<<endl;
  17.         //else if(a%3==0 && b%2==0)cout<<"Yes"<<endl;
  18.         else cout<<"No"<<endl;
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement