RT
#include<bits/stdc++.h> using namespace std; long long int n, x, maxn; int main() { scanf("%lld", &n); for (int i = 0; i < n; i++) { scanf("%lld", &x); if (x > 0 && pow(sqrt(x), 2) != x)maxn = max(x, maxn); } printf("%lld", maxn); return 0; }