#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
int snum(int num)
{
int total = 0 ;
int orinum = num;
if( num == 0)
return 1;
else
{
while(num > 0)
{
total = total * 10 + num % 10;
num /= 10;
}
if(total == orinum)
return 1;
else
return 0;
}
}
int main(int argc, char* argv[])
{
int i;
for(i=0;i<256;i++)
{
if(snum(i*i) == 1)
printf("%d\n",i);
}
return 0;
}