/// You just can't beat the person who never gives up
/// ICPC next year

//#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include<bits/stdc++.h>
using namespace std ;
const int N = 1e6+5 ;

int n ,a[N] ;
int spf[N] ,vis[N] ,vid ;
bool is[N] ;
void sieve(){
    for(int i=1;i<N;++i) spf[i]=i;
    for(int i=2;i*i<N;++i)if(spf[i]==i){
            for(int j=i*i;j<N;j+=i)if(spf[j]==j)spf[j]=i;
        }
}
vector<int> factorize(int x){
    vector<int> ret;
    ++vid ;
    while(x!=1){
        if(vis[spf[x]]!=vid) ret.push_back(spf[x]);
        vis[spf[x]] = vid ;
        x/=spf[x];
    }
    return ret;
}
int x ;
bool Never_give_up(){
    sieve();
    scanf("%d",&n);
    for(int i=0;i<n;++i){
        scanf("%d",a+i);
        x = __gcd(x,a[i]);
    }
    if(x!=1) return cout << "not coprime\n" ,0 ;
    for(int i=n-1;i>=0;--i){
        auto vec = factorize(a[i]);
        for(int j:vec) if(is[j]) return cout << "setwise coprime\n" ,0 ;
        for(int j:vec) is[j] = 1 ;
    }
    cout << "pairwise coprime\n";
}
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt" ,"r" ,stdin);
    freopen("output.txt" ,"w" ,stdout);
#endif
    //std::ios::sync_with_stdio(0);
    //cin.tie(0) ,cout.tie(0);
    int t = 1 ;
    //scanf("%d",&t);
    while(t--){
        Never_give_up();
    }
    return 0;
}
