#include<bits/stdc++.h>
using namespace std;
int main(){
  int  a,b,x;
for(int i=1000;i<=9999;i++){
x=i;
a=x/100;
  b=x%100;
  if((a+b)*(a+b)==x) cout<<x<<endl;
    }
                       

 
    return 0;
}
 
	
	
 
/**************************************************************
	Problem: 1085
	User: wangyousi
	Language: C++
	Result: Accepted
	Time:21 ms
	Memory:2072 kb
****************************************************************/