#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll mod=1e9+7;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll N=1e6+1;
    vector<bool>prime(N,true);
    for(ll i=2;i*i<N;i++){
        if(prime[i]){
            for(ll j=i*i;j<N;j+=i)prime[j]=false;
        }
    }
    map<ll,map<ll,ll>>ap;
    for(ll i=2;i*i<N;i++){
        if(prime[i]){
            for(ll j=i;j<N;j+=i){
                ap[j][i]++;
            }
        }
    }
    ll n;
    cin>>n;
    vector<ll>v(n);
    for(ll i=0;i<n;i++)cin>>v[i];
    sort(v.begin(),v.end());
    if(v[0]==1){
        ll ans=v[0];
        for(ll i=1;i<n;i++){
           ans=__gcd(ans,v[i]);
        }
        if(ans==1){
           cout<<"setwise coprime"<<endl;
        }
        else cout<<"not coprime"<<endl;
        return 0;
    }
    map<ll,ll>freq;
    bool flag=true;
    for(ll i=0;i<n;i++){
        ll val=v[i];
        for(auto j:ap[val]){
            if(freq.count(j.first)){
                flag=false;
                break;
            }
            freq[j.first]++;
        }
        if(!flag)break;
    }
    if(flag){
        cout<<"pairwise coprime"<<endl;
        return 0;
    }
    ll ans=v[0];
    for(ll i=1;i<n;i++){
        ans=__gcd(ans,v[i]);
    }
    if(ans==1){
        cout<<"setwise coprime"<<endl;
    }
    else cout<<"not coprime"<<endl;
    return 0;
}

