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 INF = (int)1E9 + 5;
const long long LINF = (long long)4E18 + 5;
const long double PI = acos(-1.0);
const long double E = 2.718281828459045L;
const double EPS = 1.0e-9;
void debugarr(int* arr, int n) {
  cout << "[";
  for (int i = 0; i < n; i++) cout << arr[i] << " ";
  cout << "]" << endl;
}
template <typename T>
T gcd(T a, T b) {
  return (b == 0) ? abs(a) : gcd(b, a % b);
}
template <typename T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
inline T mod(T a, T b) {
  return (a % b + b) % b;
}
template <typename T>
inline T sqr(T x) {
  return x * x;
}
template <typename T>
inline string tostring(const T& x) {
  ostringstream os;
  os << x;
  return os.str();
}
inline int toint(const string& s) {
  istringstream is(s);
  int x;
  is >> x;
  return x;
}
inline long double todouble(const string& s) {
  istringstream is(s);
  long double x;
  is >> x;
  return x;
}
inline string tolower(string s) {
  for (typeof((s).begin()) it = (s).begin(); it != (s).end(); ++it)
    *it = tolower(*it);
  return s;
}
inline string toupper(string s) {
  for (typeof((s).begin()) it = (s).begin(); it != (s).end(); ++it)
    *it = toupper(*it);
  return s;
}
inline int todecimal(string s) {
  int a = 0;
  for (int i = 0; i < (s.size()); i++) a = 2 * a + (s[i] - '0');
  return a;
}
inline string tobinary(int a) {
  string s;
  while (a != 0) {
    s = (char)(a % 2 + '0') + s;
    a >>= 1;
  }
  return s;
}
inline int isvowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
  return 0;
}
inline int isprime(int a) {
  for (int i = 2; i * i <= a; i++)
    if (!(a % i)) return 0;
  return 1;
}
struct st {
  int a;
  int b;
  int c;
};
bool compare(const st& x, const st& y) { return x.a > y.a; }
int n;
long long a[200005];
void preprocess() {
  for (long long i = 1; i <= 100000; i++) a[i] = i * (i + 1) / 2;
}
void solve() {
  long long b, c;
  int d = 0;
  int low, high, mid;
  for (int i = 1; i <= 100000; i++) {
    b = a[i];
    c = n - a[i];
    low = 1;
    high = 100000;
    while (low <= high) {
      mid = low + high;
      mid >>= 1;
      if (a[mid] == c)
        break;
      else if (a[mid] > c)
        high = mid - 1;
      else
        low = mid + 1;
    }
    if (a[mid] == c) {
      cout << "YES";
      d = 1;
      break;
    }
  }
  if (!d) cout << "NO";
}
void input() { scanf("%d", &n); }
int main() {
  preprocess();
  int T = 1;
  for (int testnum = 1; testnum <= T; testnum++) {
    input();
    solve();
  }
  return 0;
}