#include <bits/stdc++.h>
#define FOR(i,k,n)  for(int i = (k);i < (n);++i)
#define REP(i,n)    FOR(i,0,n)
#define ALL(x)      begin(x),end(x)

using namespace std;
using vecint = vector<int>;
using ll = int64_t;

bool ok(ll a, ll b) {
  if (min(a,b) == 0) return true;
  if (a%2 == 0) {
    if (ok(a/2, b-1)) return true;
  }
  if (b%2 == 0) {
    if (ok(a-1, b/2)) return true;
  }
  return false;
}

int main()
{
  ll a,b;
  cin>>a>>b;
  auto ans = ok(a,b);
  if(ans) {
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  return 0;
}