fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin >> t;
  7. while(t--){
  8. int a,b;
  9. cin >> a >> b;
  10. int sum = a + 2*b;
  11. if(sum % 2 != 0)
  12. cout << "no\n";
  13. else{
  14. if(a == 0 && b % 2 != 0)
  15. cout << "no\n";
  16. else
  17. cout << "yes\n";
  18. }
  19. }
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5280KB
stdin
5
0 1
0 3
2 0
2 3
3 1
stdout
no
no
yes
yes
no