#include #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(x) (x).begin(), (x).end() #define Ye cout<<"Yes"<>P; rep(i,1000){ rep(j,1000){ if((i+1)*(i+1)+(j+1)*(j+1)==P){ bol++; break; } } if(bol==1)break; } if(bol==1)Ye; else No; }