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;
void time() {}
void print_arr(int n, bool arr[]) {
  for (int i = 0; i < n; i++) {
    cout << arr[i] << " ";
  }
  cout << "\n";
}
void print_arr(int n, int arr[]) {
  for (int i = 0; i < n; i++) {
    cout << arr[i] << " ";
  }
  cout << "\n";
}
void print_vec(vector<int> &vec) {
  for (auto e : vec) {
    cout << e << " ";
  }
  cout << "\n";
}
void print_vec(vector<long long> &vec) {
  for (auto e : vec) {
    cout << e << " ";
  }
  cout << "\n";
}
void print_vec(vector<bool> &vec) {
  for (auto e : vec) {
    cout << e << " ";
  }
  cout << "\n";
}
static int speed_increase = []() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(NULL);
  return 0;
}();
void resetc(unordered_map<long long, long long> &comp) {
  long long prod = 1;
  comp[1] = 0;
  for (int i = 1; i < 12; i++) {
    prod *= 2;
    comp[prod] = 0;
  }
}
string check(unordered_map<long long, long long> &comp) {
  for (int i = 0; i < 11; i++) {
    long long pw = pow(2, i);
    comp[2 * pw] += comp[pw] / 2;
  }
  if (comp[2048] >= 1)
    return "yEs";
  else
    return "nO";
}
void print_map(unordered_map<long long, long long> &comp) {
  for (auto e : comp) {
    cout << e.first << " : " << e.second << "\n";
  }
  cout << "\n";
}
void dfs(vector<vector<int> > &mat, vector<bool> &visited, int curr, int n) {
  visited[curr] = true;
  for (int i = 0; i < n; i++) {
    if (mat[curr][i] > 0 && !visited[i]) dfs(mat, visited, i, n);
  }
}
vector<long long> dpa;
long long dp(map<long long, long long> &freq,
             map<long long, long long>::iterator itr, const int oindex) {
  if (itr == freq.end()) return 0;
  int index = oindex;
  if (dpa[index] > 0) {
    return dpa[index];
  }
  auto nxt = itr;
  long long can1 = dp(freq, ++nxt, ++index);
  if (nxt != freq.end()) {
    if (nxt->first - 1 == itr->first) {
      nxt++;
      index++;
    }
  }
  long long can2 = itr->first * itr->second + dp(freq, nxt, index);
  dpa[oindex] = max(can1, can2);
  return dpa[oindex];
}
int main() {
  long long n;
  cin >> n;
  long long m = 1 + sqrt(n * 2);
  bool f = false;
  for (int i = 1; i <= m; i++) {
    long long c = ((i + 1) * i) / 2;
    c = n - c;
    long long a = sqrt(c * 2);
    if (a * (a + 1) == c * 2 && c != 0) {
      f = true;
      break;
    }
  }
  if (f)
    cout << "YES";
  else
    cout << "NO";
  time();
  return 0;
}