#include <bits/stdc++.h>
using namespace std;
map<long long, long long> m;
int main() {
  long long n, sum = 0;
  cin >> n;
  for (int i = 1; i < 100000; i++) {
    sum += i;
    m[sum] = 1;
    if (m.find(n - sum) != m.end()) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
