#include #define REP(i,n) for(int i=0,i##_len=int(n);i>s; ll ans = -1; constexpr ll p10_7 = 1e7; rep(x, 1000, p10_7 + 10000) { ll y = x*x; if(s == y % p10_7) { ans = y; cerr << x << " " << y << endl; break; } } cerr << ans << endl; std::cout << (ans==-1?"NO":"YES") << endl; }