#include<bits/stdc++.h>
using namespace std;
using ll = long long;
ll lcm(ll a,ll b){return a*b/__gcd(a,b);}
ll const MOD = 1e9 + 7;
ll const N = 1e6+5;
vector<bool>chk(N,false);
int main()
{
    ll n,gg=1;
    cin>>n;
    vector<ll>a(n),even;
    set<ll>odd;
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]%2==1&&a[i]!=1)odd.insert(a[i]),chk[a[i]]=true;
        else even.push_back(a[i]);
    }
    if(even.size()>=2){gg=5ll;goto done;}
    for(auto i:odd)
    {
        for(ll j=i+i;j<=N;j+=i)
            if(chk[j]==true){gg=5ll;goto done;}
    }
    done:;
    ll g=0;
    for(ll i=0;i<n;i++)
        g=__gcd(g,a[i]);
    if(gg==1)cout<<"pairwise coprime"<<endl;
    else if(g==1)cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
}
