#include using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef pair pll; typedef long double D; //typedef complex P; #define F first #define S second const ll MOD=1000000007; //const ll MOD=998244353; templateistream & operator >> (istream &i,pair &A){i>>A.F>>A.S; return i;} templateistream & operator >> (istream &i,vector &A){for(auto &I:A){i>>I;} return i;} templateostream & operator << (ostream &o,const pair &A){o<ostream & operator << (ostream &o,const vector &A){int i=A.size(); for(auto &I:A){o<>N; for(int i=0;i>a; if(a!=-1){ans=gcd(ans,a);} } cout<<(ans==0?-1LL:ans*ans)<