#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(k,i,n) for(ll i=k;i<n;++i)
int main(void){
    ll n;
    cin>>n;
    vector<ll>a(n);
    ll l=1,g,tmp=1;
    bool t=true;
    rep(0,i,n){
        cin>>a[i];
        if(i==0)g=a[0];
        if(t){
            if(l!=tmp)t=false;
            l=lcm(a[i],l);
            tmp=a[i]*tmp;
        }
        g=gcd(a[i],g);
        //cout<<g<<endl;
    }
    if((g==1)&&t){
        cout<<"pairwise coprime";
    }else if(g==1){
        cout<<"setwise coprime";
    }else{
        cout<<"not coprime";
    }
}