#include using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); ll A, B; cin >> A >> B; queue> que; que.push(make_pair(A, B)); while (!que.empty()) { ll X = que.front().first; ll Y = que.front().second; que.pop(); if (X * Y == 0) { cout << "Yes\n"; return 0; } if (X % 2 == 0) que.push(make_pair(X / 2, Y - 1)); if (Y % 2 == 0) que.push(make_pair(X - 1, Y / 2)); } cout << "No\n"; }