#include #include #include #include using namespace std; template class y_combinator_result { Fun fun_; public: template explicit y_combinator_result(T &&fun): fun_(std::forward(fun)) {} template decltype(auto) operator()(Args &&...args) { return fun_(std::ref(*this), std::forward(args)...); } }; template decltype(auto) y_combinator(Fun &&fun) { return y_combinator_result>(std::forward(fun)); } int main() { int w, k, c; cin >> w >> k >> c; vector> seen(w+1); vector> can(w+1); auto dfs = y_combinator([&](auto self, int have, int want) -> bool { if(have == want) return true; if(have > want) return false; if(seen[have][want]) return can[have][want]; seen[have][want] = true; for(int i = 1; i <= have - c; i++) { if(self(i, want - (have - 1))) { can[have].set(want); return true; } } return false; }); if(dfs(k, w)) return void(cout << "yes\n"), 0; cout << "no\n"; }