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