#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(k,i,n) for(ll i=k;i<n;++i)
#define pb push_back
int main(void){
    ll n;
    cin>>n;
    vector<ll>a(n);
    rep(0,i,n)cin>>a[i];
    ll g=a[0];
    vector<ll>p;
    bool t=true;
    rep(0,i,n){
        g=gcd(g,a[i]);
        if(t){
               ll tmp=sqrt(a[i])+5;
               rep(2,j,tmp){
                if(a[i]%j==0){
                    if(binary_search(p.begin(),p.end(),j))t=false;
                    p.pb(j);
                    while(a[i]%j==0){
                        a[i]/=j;
                    }
                }
                }
            if(a[i]!=1)p.pb(a[i]);
        }
    }
    //rep(0,i,(ll)p.size())cout<<p[i]<<endl;
    if(t){
        cout<<"pairwise coprime";
    }else if(g==1){
        cout<<"setwise coprime";
    }else{
        cout<<"not coprime";
    }
}
