//AUTHOR - NIMISH UPADHYAY
//FROM IIIT ALLAHABAD
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define UPADHYAY int t;cin>>t;while(t--) 
#define pb push_back
#define NIMISH ios_base::sync_with_stdio(false);cin.tie(NULL);
int main(){
    ll m=1e6+1;
    ll c[m+1]={0},i,j,k=1,f,n;
    vector<ll>v[m+1];
    for(i=2;i<=1e6;i++){
        if(c[i]==0){
            for(j=2;j*i<=1e6;j++){
                v[i*j].pb(i);
                c[j*i]=1;
            }
        }
    }
    map<ll,ll>m1;
    cin>>n;
    for(i=1;i<=n;i++){
        cin>>j;
        for(auto it:v[j]){
            m1[it]++;
            if(m1[it]>=2)
            k=0;
        }
        if(i==1)
        f=j;
        else
        f=__gcd(f,j);
    }
    if(k==1)
    cout<<"pairwise coprime";
    else
    {
        if(f==1)
        cout<<"setwise coprime";
        else
        cout<<"not coprime";
    }
}