#include<bits/stdc++.h>
using namespace std;
#define ll long long int

int main(){
    ll n;
    cin>>n;
    ll a[n],ans=0,mx=1000000;
    vector<ll> v(mx+10,0);
    for(ll i=0;i<n;i++) cin>>a[i],v[a[i]]++;
    for(ll i=0;i<mx+10;i++) if(v[i]>1)  ans=-1;
    for(ll i=2;i<=mx;i++){
        ll cnt=0;
        for(ll j=i;j<=mx;j+=i){
            if(v[j])   cnt++;
        }
        if(cnt>1){
            ans=-1;
            break;
        }
    }
    if(ans!=-1){
        cout<<"pairwise coprime"<<endl;
        return 0;
    }
    ans=a[0];
    for(ll i=1;i<n;i++) ans=__gcd(ans,a[i]);
    if(ans==1)  cout<<"setwise coprime"<<endl;
    else        cout<<"not coprime"<<endl;
    return 0;
}
