#include #include #include #include #include #include #include #include #include #include static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template constexpr T INF = ::numeric_limits::max()/32*15+208; int solve(int n){ for (ll i = 3; i*(i+1)/2 <= n; ++i) { ll x = n-i*(i+1)/2; if(x%i == 0){ return i; } } return 0; } int main() { int n; cin >> n; if(solve(n) >= 3) puts("YES"); else puts("NO"); return 0; }