/** * @FileName a.cpp * @Author kanpurin * @Created 2021.04.02 22:45:04 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; template struct Dijkstra { private: int V; struct edge { int to; T cost; }; vector> G; public: const T inf = numeric_limits::max(); vector d; Dijkstra() {} Dijkstra(int V) : V(V) { G.resize(V); } Dijkstra& operator=(const Dijkstra& obj) { this->V = obj.V; this->G = obj.G; this->d = obj.d; return *this; } void add_edge(int from, int to, T weight, bool directed = false) { G[from].push_back({to,weight}); if (!directed) G[to].push_back({from,weight}); } int add_vertex() { G.push_back(vector()); return V++; } void build(int s) { d.assign(V, inf); typedef tuple P; queue

pq; d[s] = 0; pq.push(P(d[s], s)); while (!pq.empty()) { P p = pq.front(); pq.pop(); int v = get<1>(p); if (d[v] < get<0>(p)) continue; for (const edge &e : G[v]) { if (d[e.to] > d[v] + e.cost) { d[e.to] = d[v] + e.cost; pq.push(P(d[e.to], e.to)); } } } } }; int main() { int n,k;cin >> n >> k; Dijkstra g(n); for (int i = 1; i <= n; i++) { if (i * 2 <= n) g.add_edge(i-1,i*2-1,1,true); if (i + 3 <= n) g.add_edge(i-1,i+3-1,1,true); } g.build(0); if (g.d[n-1] <= k) { puts("YES"); } else { puts("NO"); } return 0; }