#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll A, B; cin >> A >> B; deque> q; q.push_back(make_pair(A, B)); while (!q.empty()) { auto p = q.front(); q.pop_front(); if (p.first == 0 || p.second == 0) { cout << "Yes" << endl; return 0; } if (p.first % 2 == 0 && p.second % 2 == 0) { q.push_back(make_pair(p.first / 2, p.second - 1)); q.push_back(make_pair(p.first - 1, p.second / 2)); } else if (p.first % 2 == 0) { q.push_back(make_pair(p.first / 2, p.second - 1)); } else if (p.second % 2 == 0) { q.push_back(make_pair(p.first - 1, p.second / 2)); } } cout << "No" << endl; return 0; }