#include <bits/stdc++.h>
using namespace std;
vector<long long> a;
int main(){
cin.tie(NULL);
cout.tie(NULL);
ios_base::sync_with_stdio(false);
long long n,gcd,t; cin>>n;
bool iseverypairvz=1;
for(long long i=0;i<n;i++){
    cin>>t; a.push_back(t);
    if(i==1) {
        gcd=__gcd(a[0],t);
        if(gcd!=1) iseverypairvz=0;
    }
    else gcd=__gcd(gcd,t);
    if(iseverypairvz){
        for(long long j=0;j<i;j++){
            if(__gcd(a[j],t)!=1){
                iseverypairvz=0;
                break;
            }
        }
    }
}
if(iseverypairvz) cout<<"pairwise coprime\n";
else if(gcd==1) cout<<"setwise coprime\n";
else cout<<"not coprime\n";
return 0;
}
