#include using namespace std; using ll = long long; using pl = pair; using vl = vector; #define rep(i,n) for(ll i=0;i<(ll)(n);++i) #define reps(i,s,n) for(ll i=(s);i<(ll)(n);++i) #define rep1(i,n) for(ll i=1;i<=(ll)(n);++i) #define fi first #define se second #define pb push_back #define eb emplace_back #define be(v) (v).begin(),(v).end() const long long INF = 1e18; #ifdef DEBUG #include #endif ll P; void input(){ cin>>P; } #ifdef DEBUG void showall(){ show(P); } #endif bool logic(){ for(ll i=1;i*i<=P;++i){ for(ll j=i;j*j<=P;++j){ if(i*i + j*j==P)return true; } } return false; } int main(){ input(); #ifdef DEBUG showall(); cout << "--- Logic ---" << endl; #endif //ll ans=logic(); //cout<