#include using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) vector f(ULL X){ X+=1; if(X&(X-1)) return {}; ULL D = 1; vector ans; rep(t,2) if(X>=(1ull<<1)){ ans.push_back(0); X>>=1; } while(X>=(1ull<<11)){ rep(k,7)rep(t,2) ans.push_back((k+1)*D); D<<=3; X>>=11; } while(X>=(1ull<<4)){ rep(k,3)rep(t,2) ans.push_back((k+1)*D); D<<=2; X>>=4; } while(X>=(1ull<<1)){ rep(t,2) ans.push_back(1*D); D<<=1; X>>=1; } ans.push_back(D); return ans; } int main() { ULL K,X; cin>>K>>X; vector ans; if(K==0) ans=f(X); else{ ans=f(X-1); if(!ans.empty()){ ULL d = K&~(K-1); for(ULL& a : ans){ a = (a&(d-1)) | ((a&~(d-1))<<1); } ans.push_back(K); } } if(ans.empty()) cout<<"No"<