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 MAXN = 45100;
long long tri[MAXN];
long long tot = 0;
bool sear(int x, int y, long long v) {
  int m;
  while (x < y) {
    m = x + (y - x) / 2;
    if (tri[m] == v)
      return true;
    else if (tri[m] > v)
      y = m;
    else
      x = m + 1;
  }
  return 0;
}
bool is_t(long long n) {
  for (int k = 0; k < tot; k++) {
    if (sear(0, tot - 1, n - tri[k])) return true;
  }
  return false;
}
int main() {
  for (int k = 1; k < 45000; k++) {
    tri[tot++] = k * (k + 1) / 2;
  }
  long long n;
  cin >> n;
  if (is_t(n))
    cout << "YES";
  else
    cout << "NO";
  return 0;
}