int main() {
//1
for (int i = 0; i < 10; ++i)
{
//2
for (int j = 0; j < 10; ++j)
{
//3
for (int n = 0; n < 10;++n)
{
//4
for (int m = 0; m < 10; ++m)
{
if ((i==j)&&(n==m)&&n!=i&&n!=j) {
int result = i * 1000 + j * 100 + n * 10 + m;
if (sqrt(result)==(int)sqrt(result)) {
printf("%d",result);
}
}
}
}
}
}
}