#include<bits/stdc++.h>
#define tmp(x) std::cout<<"& "<<(x)<<" &\n"
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
#define mp make_pair
#define pii pair<int,int>
typedef long long ll;

using namespace std;
const int maxn=1e6+100;
int n,t;
int a[maxn],vis[maxn];
int isprime[maxn],p2[maxn];
int prime[maxn];
void genep(){
    int cnt=1;
    for(int i=2;i<maxn;++i){
        if(!isprime[i]){prime[cnt++]=i;   }
        for(int j=1;j<=cnt&&i*prime[j]<=maxn;++j){
            isprime[i*prime[j]]=1;
            if(i%prime[j]==0){
                break;
            }
        }
    }
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>n;
    genep();
    int fl=1;
    rep(i,1,n){
        cin>>a[i];++vis[a[i]];
        if(vis[a[i]]>1)fl=1;
    }
    rep(uu,1,maxn){
        if(vis[uu]){
            int q=sqrt(uu)+1,j=1,v=uu;
            while(prime[j]<=q){
                if(v%prime[j]==0){
                    while(v%prime[j]==0)v/=prime[j];
                    if(!p2[j])p2[j]=1;
                    else {fl=0;break;}
                }
                if(v==1)break;
                ++j;
            }
            if(v>1){
                if(!p2[v])p2[v]=1;
                else fl=0;break;
            }
        }
    }
    if(fl){
        cout<<"pairwise coprime";
    }
    else{
        int rr=a[1];
        rep(i,2,n){
            rr=__gcd(a[i],rr);
            if(rr==1)break;
        }
        if(rr==1)cout<<"setwise coprime";
        else cout<<"not coprime";
    }



    return 0;
}
