#include<bits/stdc++.h>
#define INFTY 10000000000
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
const int MOD=1000000007;
const int di[4] = {-1,0,1,0};
const int dj[4] = {0,-1,0,1};
const int INF = 1e9;
int main(){
    int n;cin>>n;
    vector<int> a(n);
    rep(i,n)cin>>a[i];
    vector<int> dd(1000010,0);
    int pp=1,sp=0;
    int sai=a[0];
    rep(i,n){
        sai = __gcd(sai,a[i]);
        for(int j=1;j*j<=a[i];j++){
            if(a[i]%j!=0)continue;
            int div = a[i]/j;
            dd[1] = 0;
            if(dd[j]!=0||dd[div]!=0){
                pp=0;
                //cout<<"i"<<j<<div<<endl;
            }else{
                dd[j]=1;dd[div]=1;
                //cout<<"e"<<j<<div<<endl;
            } 
        }
    }
    if(pp)cout<<"pairwise coprime"<<endl;
    else if(sai==1)cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
    return 0;
}