#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;

vector<ll> SieveRev(ll n){
    vector<ll> IsPrime(n+1,1);
    IsPrime[0]=IsPrime[1]=0;
    for(ll i=2;i*i<=n;i++){
        if(IsPrime[i]==1){
            for(ll j=i;i*j<=n;j++){
                IsPrime[i*j]=i;
            }
        }
    }
    for(ll i=2;i<=n;i++){
        if(IsPrime[i]==1) IsPrime[i]=i;
    }
    return IsPrime;
}

int main(){
    ll n;
    cin>>n;
    vector<ll> a(n);
    cin>>a[0];
    ll gcd=a[0],mx=a[0];
    for(ll i=1;i<n;i++){
        cin>>a[i];
        gcd=__gcd(gcd,a[i]);
        mx=max(mx,a[i]);
    }
    if(gcd!=1){
        cout<<"not coprime"<<endl;
        return 0;
    }else{
        vector<ll> pf1=SieveRev(mx);
        vector<bool> isu(mx+1,0); 
        rep(i,n){
            if(a[i]==1) break;
            vector<ll> pf;
            while(a[i]!=1){
                pf.push_back(pf1[a[i]]);
                a[i]/=pf1[a[i]];
            }
            rep(j,pf.size()){
                if(isu[pf[j]]){
                    cout<<"setwise coprime"<<endl;
                    return 0;
                }
            }
            rep(j,pf.size()) isu[pf[j]]=1;
        }
        cout<<"pairwise coprime"<<endl;
        return 0;
    }
}