#include<bits/stdc++.h>
using namespace std;
#define INIT  ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define mp make_pair
#define pb push_back
#define ft first
#define sc second
#define ll long long
#define pii pair<int, int>
#define count_bits __builtin_popcount
#define int ll

int t, n, m, k, a[300010], q, l, r;
bool v[1000010];
int cnt[1000010];


int32_t main(){
INIT
cin>>n;
int sgcd=0;
bool sw=false, pw=true;
for(int i=1; i<=n; i++){
    cin>>a[i]; cnt[a[i] ]++;
    sgcd=__gcd(sgcd, a[i]);
}
if(sgcd==1){sw=true;}


for(int i=2; i<=1000000; i++){
    if(!v[i]){
        int c=0; c+=cnt[i];
        for(int j=2*i; j<=1000000; j+=i){
            v[j]=true;
            c+=cnt[j];
        }
    if(c>1){pw=false; break;}
    }
}

if( pw ){
    cout<<"pairwise coprime";
}
else{
    if(sw){
        cout<<"setwise coprime";
    }
    else{
        cout<<"not coprime";
    }
}




return 0;
}



