#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){ int l = 0, r = 0; for (ll i = 1; i*(i+1)/2 <= n; ++i) { ll x = n-i*(i+1)/2; if(x%i == 0){ l = x/i, r = i; } } return r-l; } int main() { int n; cin >> n; if(solve(n) >= 3) puts("YES"); else puts("NO"); return 0; }