Problem: As you very well know, this year's funkiest numbers are so called triangular numbers (that is, integers that are representable as <image>, where k is some positive integer), and the coolest numbers are those that are representable as a sum of two triangular numbers.

A well-known hipster Andrew adores everything funky and cool but unfortunately, he isn't good at maths. Given number n, help him define whether this number can be represented by a sum of two triangular numbers (not necessarily different)!

Input

The first input line contains an integer n (1 ≤ n ≤ 109).

Output

Print "YES" (without the quotes), if n can be represented as a sum of two triangular numbers, otherwise print "NO" (without the quotes).

Examples

Input

256


Output

YES


Input

512


Output

NO

Note

In the first sample number <image>.

In the second sample number 512 can not be represented as a sum of two triangular numbers.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double e1 = 1e-9;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename A, typename B>
istream& operator>>(istream& input, pair<A, B>& x) {
  input >> x.first >> x.second;
  return input;
}
template <typename A>
istream& operator>>(istream& input, vector<A>& x) {
  for (auto& i : x) input >> i;
  return input;
}
template <typename A>
ostream& operator<<(ostream& output, vector<A>& x) {
  for (auto& i : x) output << i << ' ';
  return output;
}
template <typename T>
void smax(T& a, T b) {
  a = max(a, b);
}
template <typename T>
void smin(T& a, T b) {
  a = min(a, b);
}
void add(long long&, long long);
long long sub(long long, long long);
long long mul(long long, long long);
long long powz(long long, long long);
long long binpow(long long, long long);
bool sortinrev(const pair<char, long long> a, pair<char, long long> b) {
  return (a.second < b.second);
}
bool sortin(const pair<long long, long long>& a,
            const pair<long long, long long>& b) {
  if (a.first < b.first) return true;
  if (a.first == b.first) return (a.second < b.second);
  return false;
}
bool Compdoub(double a, double b) {
  if ((a - b) < e1)
    return 1;
  else
    return 0;
}
const long long N = 1e6 + 400;
const long long inf = 1e9 + 100;
map<long long, bool> avl;
long long tri(long long x) { return (x * (x + 1)) / 2; }
void solve() {
  long long n;
  cin >> n;
  for (long long i = 1; i < N; i++) {
    avl[tri(i)] = 1;
  }
  bool ok = 0;
  for (long long i = 1;; i++) {
    if (tri(i) >= n) break;
    if (avl[n - tri(i)]) ok = true;
  }
  cout << (ok ? "YES" : "NO");
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long tc = 1;
  for (long long _ = 0; _ < tc; _++) {
    solve();
    if (_ != tc - 1) cout << "\n";
  }
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * 1ll * a;
    b >>= 1;
  }
  return res;
}
long long powz(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    b /= 2;
    a = mul(a, a);
  }
  return res;
}
long long sub(long long a, long long b) {
  a -= b;
  if (a < 0) {
    a += mod;
  }
  return a;
}
long long mul(long long a, long long b) { return ((a)*1ll * (b)) % mod; }
void add(long long& a, long long b) {
  a += b;
  if (a >= mod) a -= mod;
}