#include #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; using ll = long long ; using P = pair ; using pll = pair; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; constexpr double PI = 3.14159265358979323846; int main(){ ll A; cin >> A; A *= 2; for(ll i=1;i*i<=A;i++){ if(A % i != 0) continue; ll y = i; ll x = A / i; if(x - y - 1 >= 0 && (x-y-1)%2 == 0 && (x+y-1)%2 == 0 && (x+y-1)/2 - (x-y-1)/2 >= 3){ printf("YES\n"); //printf("%lld %lld",(x-y-1)/2,(x+y-1)/2); return 0; } } printf("NO\n"); return 0; }