#include #include #include #include #include #include #include #include #include #include #include #define L64 long long #define UL64 unsigned long long #define MOD (1000000007LL) struct task{ task(L64 a, L64 b) : a(a), b(b){} L64 a; L64 b; }; int main(void) { L64 a, b; std::cin >> a >> b; std::vector tasks; int tasknum = 1; int done = 0; bool found = false; tasks.push_back(task(a, b)); while(done < tasknum){ L64 ta = tasks[done].a; L64 tb = tasks[done].b; if(ta == 0 || tb == 0){ found = true; break; } if(ta % 2 == 0){ tasks.push_back(task(ta / 2, tb - 1LL)); tasknum++; if (tb % 4 == 0) { tasks.push_back(task(ta - 2LL, tb / 4)); tasknum++; } } else { if (tb % 2 == 0) { tasks.push_back(task(ta - 1LL, tb / 2)); tasknum++; } } done++; } if(found){ std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } }