#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n;

for( int i = 1000; i < n ; i ++ )
{
    int m = i;
    int a1 = i % 100;
    int a2 = i / 100;
    if((a1 + a2) * (a1 + a2) == i)    cout << i << endl;
}
return 0;

}