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 int N = 1e6 + 123;
const double PI = acos(-1);
const long long MOD = 1000000007;
long long dx[] = {+1, 0, -1, 0, +1, +1, -1, -1};
long long dy[] = {0, +1, 0, -1, +1, -1, +1, -1};
long long dx8[] = {+1, +1, -1, -1, +2, +2, -2, -2};
long long dy8[] = {+2, -2, +2, -2, +1, -1, +1, -1};
long long powmod(long long a, long long b) {
  a %= MOD;
  if (!a) return 0;
  long long pr = 1;
  while (b > 0) {
    if (b & 1) {
      pr *= a;
      pr %= MOD;
      --b;
    }
    a *= a;
    a %= MOD;
    b /= 2;
  }
  return pr;
}
long long modinverse(long long a) { return powmod(a, MOD - 2); }
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 or n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i += 6) {
    if (n % i == 0 or n % (i + 2) == 0) return false;
  }
  return true;
}
void seive(bool a[]) {
  long long mx = sqrt(N), ii, jj;
  for (ii = 3; ii <= mx; ii += 2)
    if (!a[ii])
      for (jj = ii * ii; jj < N; jj += 2 * ii) a[jj] = true;
}
void numofdiv(long long a[]) {
  long long mx = sqrt(N), ii, jj;
  for (ii = 1; ii <= mx; ii++) {
    for (jj = ii * ii; jj < N; jj += ii) {
      if (jj == ii * ii)
        a[jj]++;
      else
        a[jj] += 2;
    }
  }
}
void sumofdiv(long long a[]) {
  long long mx = sqrt(N), ii, jj;
  for (ii = 1; ii <= mx; ii++) {
    for (jj = ii * ii; jj < N; jj += ii) {
      if (jj == ii * ii)
        a[jj] += ii;
      else
        a[jj] += ii + jj / ii;
    }
  }
}
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first < b.first;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  vector<long long> v;
  int n;
  cin >> n;
  for (int i = 1; i <= 46000; i++) {
    v.push_back((i * (i + 1)) / 2);
  }
  int s = 0, e = v.size() - 1;
  bool flag = false;
  while (s <= e) {
    if (v[s] + v[e] == n) {
      flag = true;
      break;
    } else if (v[s] + v[e] > n) {
      e--;
    } else {
      s++;
    }
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
}