#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ios_base::sync_with_stdio(NULL);
    cin.tie(NULL);
    cout.tie(NULL);
    int n=2e6;
    ll cnt[n+2];
    ll tot[n+2];
    memset(tot,0,sizeof tot);
    memset(cnt,0,sizeof cnt);
    ll gc=0;
    ll req=0;
    int m;
    cin>>m;
    for(int i=0;i<m;i++)
    {
        ll x;
        cin>>x;
        cnt[x]++;
        if(gc==0) gc=x;
        else gc=__gcd(gc,x);
    }
    int sq=sqrt(n);
    for(int i=2;i<=sq;i++)
    {
        for(int j=i;j<=n;j++)
        {
            tot[i] += tot[j];
        }
    }
    for(int i=2;i<=n;i++)
    {
        if(max(tot[i],cnt[i])>1)
        {
            req=1;
        }
    }
    if(req==0)
    {
        cout<<"pairwise coprime"<<endl;
    }
    else
    {
        if(gc==1)
        {
            cout<<"setwise coprime"<<endl;
        }
        else cout<<"not coprime"<<endl;
    }
    return 0;

}
