#include #include #include #include #include #include using namespace std; vector make_is_prime(int N) { vector prime(N + 1, true); if (N >= 0) prime[0] = false; if (N >= 1) prime[1] = false; for (int i = 2; i * i <= N; i++) { if (!prime[i]) continue; for (int j = i * i; j <= N; j += i) { prime[j] = false; } } return prime; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int P; cin >> P; setjuge; vectorG; for (int i=1; i<=10000; i++){ int score = i * i; G.push_back(score); juge.insert(score); } for (int i=0; i<10000; i++){ int cost = P - G[i]; if (juge.find(cost) != juge.end()){ cout << "Yes" << endl; return 0; } } cout << "No" << endl; }