#include<iostream> #include<cmath> using namespace std; int main(){ int x; while(cin>>x){ if(sqrt(x) == int(sqrt(x))){ cout<<"1\n"; }else{ cout<<"0\n"; } } return 0; }