#include "bits/stdc++.h"
using namespace std;
#define int long long

int32_t main() {
    cin.tie(0)->sync_with_stdio(0);
    int a, b;
    cin >> a >> b;
    cout << (__lg(a) == __lg(b) ? "Yes" : "No");
}