fork download
  1. #include <bits/stdc++.h>
  2. #define ll long long
  3. using namespace std;
  4.  
  5.  
  6. int main()
  7. {
  8. int t; cin >> t;
  9. while(t--)
  10. {
  11. int n, m; cin >> n >> m;
  12. if(n == 0 && m % 2)
  13. cout << "NO";
  14. else if(n % 2 && m == 0)
  15. cout << "NO";
  16. else if(n % 2 == 0)
  17. cout << "YES";
  18. else
  19. cout << "NO";
  20. cout << "\n";
  21. }
  22. }
  23.  
Success #stdin #stdout 0.01s 5272KB
stdin
Standard input is empty
stdout
Standard output is empty