typedef long long ll; typedef long double ld; #include using namespace std; #define int long long ll isqrt(ll N){ ll sqrtN=sqrt(N)-1; while(sqrtN+1<=N/(sqrtN+1))sqrtN++; return sqrtN; } signed main(){ ll p; std::cin >> p; for (int i = 1; i*i < p; i++) { ll rem = p-i*i; if(isqrt(rem)*isqrt(rem)==rem){ std::cout << "Yes" << std::endl; return 0; } } std::cout << "No" << std::endl; }