#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll MOD = 1000000007; struct Node { int v; int dist; Node(int v = -1, int dist = -1) { this->v = v; this->dist = dist; } }; int main() { int N, K; cin >> N >> K; queue que; que.push(Node(1, 0)); bool visited[N + 1]; memset(visited, false, sizeof(visited)); while (not que.empty()) { Node node = que.front(); que.pop(); if (node.dist > K) continue; if (visited[node.v]) continue; visited[node.v] = true; if (node.v == N) { cout << "YES" << endl; return 0; } int nv = node.v * 2; if (nv <= N) { que.push(Node(nv, node.dist + 1)); } int nv2 = node.v + 3; if (nv2 <= N) { que.push(Node(nv2, node.dist + 1)); } } cout << "NO" << endl; return 0; }