#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;

int main()
{
    ll n;
    cin>>n;
    vector<ll>a(n);
    for(auto &i:a)cin>>i;
    ll g=a[0];
    for(int i=1;i<n;i++)
        g=__gcd(g,a[i]);
    ll l=a[0];
    ll gg=0,k;
    for(ll i=0;i<n;i++)
    {
        k=lcm(l,a[i]);
        gg=__gcd(gg,k);
        l=__gcd(a[i],l);
    }
    if(gg==1)cout<<"pairwise coprime"<<endl;
    else if(g==1)cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
}
