#include using namespace std; bool is_square(int n) { if (n<=0) { return false; } long long l=0,r=n; while (r-l>1) { long long mid=(l+r)/2; (mid*mid<=n?l:r)=mid; } return l*l==n; } int main() { int p; cin>>p; bool ans=false; for (int i=1;i*i<=p;i++) { ans|=is_square(p-i*i); } cout<<(ans?"Yes":"No")<