#include using namespace std; using ll = long long; #define REP(i,n) for(int i=0;i> s; for(ll i=1; i<=2e6; i++) { ll ch = i*i; if(ch < 1e6) continue; bool ok = true; REP(j, 6) { if(ch % 10 != s[5-j] - '0') ok = false; ch /= 10; } if(ok) { cout << "Yes"; return 0; } } cout << "No"; return 0; }