#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); ll A; cin >> A; A *= 2; for (ll i = 1; i * i <= A; i++) { if (A % i == 0) { ll x, y, N, M; x = i, y = A / i; if ((x + y - 1) % 2 != 0) continue; if (x < y) swap(x, y); N = (x + y - 1) / 2; M = (x - y - 1) / 2; if (N <= 0 || M <= 0) continue; if (M + 3 > N) continue; cout << "YES" << '\n'; return 0; } } cout << "NO" << '\n'; return 0; }