#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) #define FOR(i,b,e) for (int i=(int)(b); i<(int)(e); i++) #define ALL(x) (x).begin(), (x).end() const double PI = acos(-1); int main() { ios_base::sync_with_stdio(0); cin.tie(0); int a; cin >> a; a *= 2; bool ck = false; for (int d = 3; d * d <= a; d++) { if (a % d) continue; int tmp = a / d - d + 1; if (tmp % 2 == 0 && tmp / 2 >= 1) ck = true; } if (ck) cout << "YES" << endl; else cout << "NO" << endl; return 0; }