#include #include #define llint long long using namespace std; llint n; llint a[1<<18]; void zeta_transform(llint a[], int n) { int S = 1<> n; for(int i = 0; i < n; i++) cin >> a[i], a[i] = max(a[i], 0LL); llint ans = 0; for(int i = 0; i < n; i++) ans = gcd(ans, a[i]); if(ans == 0) cout << -1 << endl; else cout << ans*ans << endl; return 0; }