#include <iostream>
#include <string>
int main ()
{
for (int numar =10; numar < 100; ++ numar) {
const int inversat = numar % 10 * 10 + numar / 10;
const std::string patrat = std::to_string(numar * numar);
if (std::string(patrat.rbegin(),patrat.rend()) == std::to_string(inversat *
inversat))
std::cout<<numar<<' ';
}
}