fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int m,n;
  6. while(cin>>m>>n){
  7. if (n==1) cout<<"YES"<<endl;
  8. else{
  9. if ((m%2)!=(n%2)) cout<<"YES"<<endl;
  10. else cout<<"NO"<<endl;
  11.  
  12.  
  13. }
  14.  
  15. }
  16. }
  17.  
Success #stdin #stdout 0.01s 5300KB
stdin
7 3
3 6
 2 5
 1 4
 7 4
stdout
NO
YES
YES
YES
YES