#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int N,K; int f(int N) { if(N == 1) return 0; if(N == 2) return 1; if(N == 4) return 1; int res = 0,M = 1,r = N%3%2; if(r == 1) { while(M*4 <= N) M *= 4,res += 2; assert((N-M)%3 == 0); res += (N-M)/3; } else { M *= 2; res++; while(M*4 <= N) M *= 4,res += 2; assert((N-M)%3 == 0); res += (N-M)/3; } return res; } void solve() { cin >> N >> K; if(N%3 == 0) { cout << "NO" << endl; return; } int need = f(N); cout << (need <= K ? "YES":"NO") << endl; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int tt = 1; //cin >> tt; while(tt--) solve(); }