#include using namespace std; using ll = long long; int main() { ll A, B; cin >> A >> B; using P = pair; map memo; auto ok = [&](auto&& self, ll A, ll B) -> bool { if (A == 0 or B == 0) { return true; } if (A % 2 == 1 and B % 2 == 1) { return false; } if (A > B) { swap(A, B); } if (memo.find(P{A, B}) != memo.end()) { return memo[{A, B}]; } if (A % 2 == 0 and self(self, A / 2, B - 1)) { return memo[{A, B}] = true; } if (B % 2 == 0 and self(self, A - 1, B / 2)) { return memo[{A, B}] = true; } return memo[{A, B}] = false; }; cout << (ok(ok, A, B) ? "Yes" : "No") << endl; return 0; }