#include <bits/stdc++.h>
using namespace std;
bool ispalindrome(int x){
stack<int> s;
queue<int> q;
while(x){
s.push(x % 10);
q.push(x % 10);
x /= 10;
}
while(!s.empty()){
if(s.top() != q.front())
return false;
s.pop();
q.pop();
}
return true;
}
int main(){
for(int i = 1; i <= 256; i++){
if(ispalindrome(i*i)){
cout<<i<<endl;
}
}
}

京公网安备 11010502036488号