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

int main(){
    ll n;
    cin>>n;
    ll a[n];
    for(ll i=0;i<n;i++) cin>>a[i];
    if(n<=1010){
        map<ll,ll> ma;
        for(ll i=0;i<n;i++){
            ll temp=a[i];
            for(ll j=2;j*j<=temp;j++){
                if(temp%j==0)   ma[j]++;
            }
        }
        ll ans=1;
        for(auto i : ma){
            if(i.second>1)  ans=-1;
        }
        if(ans!=-1){
            cout<<"pairwise coprime"<<endl;
            return 0;
        }
    }
    ll 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;
}
