int IsAutomorphic(int x){
int x1,x2,n=10;
x1=x*x;
while(1){
x2=x1%n;
if(x2==x) {return 1;break;}
else if(x1/n>=10)n*=10;
else {return 0;break;}
}
}
void FindAutomorphic(int lower, int upper){
int j=0;
for(int i=lower;i<=upper;i++){
if(IsAutomorphic(i))
{printf("%d\n",i);
j=1;
}
}
if(j==0) printf("None");
}