include <stdio.h>
include <math.h>
int res(int n)
{
int res = 0;
while(n!=0)
{
res = n % 10 + res * 10;
n /= 10;
}
return res;
}
main()
{
int a;
for ( a = 0; a < 257; a++ )
{
if ( a * a == res ( a * a ) )
{
printf ( "%d\n", a );
}
}
}