#include using namespace std; using ll = long long; #define int ll using VI = vector; using VVI = vector; using PII = pair; #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) x.begin(), x.end() #define PB push_back const ll LLINF = (1LL<<60); const int INF = (1LL<<30); const int MOD = 1000000007; template T &chmin(T &a, const T &b) { return a = min(a, b); } template T &chmax(T &a, const T &b) { return a = max(a, b); } template bool IN(T a, T b, T x) { return a<=x&&x T ceil(T a, T b) { return a/b + !!(a%b); } template ostream &operator <<(ostream& out,const pair& a){ out<<'('< ostream &operator <<(ostream& out,const vector& a){ out<<'['; REP(i, a.size()) {out<> a >> b; if(a > b) swap(a, b); queue que; que.push({a, b}); map used; used[{a, b}] = true; bool ok = false; while(que.size()) { PII p = que.front(); que.pop(); // cout << p << endl; if(p.first == 0 || p.second == 0) { ok = true; break; } // 操作1 int na = p.first/2, nb = p.second-1; if(p.first%2==0 && nb>=0 && used.find({na, nb}) == used.end()) { que.push({na, nb}); used[{na, nb}] = true; } // 操作2 na = p.first-1, nb = p.second/2; if(p.second%2==0 && na>=0 && used.find({na, nb}) == used.end()) { que.push({na, nb}); used[{na, nb}] = true; } } if(ok) cout << "Yes" << endl; else cout << "No" << endl; return 0; }