#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while(t--){
int a,b;
cin >> a >> b;
int sum = a + 2*b;
if(sum % 2 != 0)
cout << "no\n";
else{
if(a == 0 && b % 2 != 0)
cout << "no\n";
else
cout << "yes\n";
}
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKICAgIGludCB0OwogICAgY2luID4+IHQ7CiAgICB3aGlsZSh0LS0pewogICAgCWludCBhLGI7CiAgICAJY2luID4+IGEgPj4gYjsKICAgIAlpbnQgc3VtID0gYSArIDIqYjsKICAgIAlpZihzdW0gJSAyICE9IDApCiAgICAJCWNvdXQgPDwgIm5vXG4iOwogICAgCWVsc2V7CiAgICAJCWlmKGEgPT0gMCAmJiBiICUgMiAhPSAwKQogICAgCQkJY291dCA8PCAibm9cbiI7CiAgICAJCWVsc2UKICAgIAkJCWNvdXQgPDwgInllc1xuIjsKICAgIAl9CiAgICB9CiAgICByZXR1cm4gMDsKfQo=