#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a,b;
for(n=1000;n<=9999;n++){
a=n%100;
b=n/100;
if((a+b)*(a+b)==n) cout<<n<<endl;
}
}
/**************************************************************
Problem: 1085
User: linzihang
Language: C++
Result: Accepted
Time:6 ms
Memory:2072 kb
****************************************************************/