#include using namespace std; typedef long long ll; ll gcd(ll a,ll b){ if(b==0){ return a; } return gcd(b,a%b); } int main(){ int n;cin >> n; vector a(n),b(n); bool f=false; for(int i=0;i> a[i]; if(a[i]!=-1){ f=true; } } if(!f){ cout << -1 << endl; return 0; } ll g=-1; for(int i=0;i