#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#define ll long long int
#define ld long double
#define pi acos(-1)
#define pb push_back
using namespace std;

#define MAXN 1000001

int spf[MAXN],ar[MAXN];

void sieve()
{
    spf[1] = 1;
    for (ll i=2; i<MAXN; i++)
        {spf[i] = i; ar[i]=0;}
    for (ll i=4; i<MAXN; i+=2)
        {spf[i] = 2; ar[i]=0;}

    for (ll i=3; i*i<MAXN; i++)
    {
        if (spf[i] == i)
        {   ar[i] = 0;
            for (ll j=i*i; j<MAXN; j+=i)
                if (spf[j]==j)
                    {spf[j] = i;
                    ar[j]=0;}
        }
    }
}

int main()
{
    ll i,j,a,k,b,c,n,t,m,p,q,d,e,f,y,g,z,h,r,l,x,o;
    ld aa,bb,cc,ee,dd,ff,kk,gg;
    vector<ll > v,s;
//    map<ll,vector<ll> > me;
    map<ll,ll > sa,ta,pa,ma;
//    priority_queue<ll, vector<ll>, greater<ll> > aq,tq,pq;
    string st,et,ft,pt,ct;
//    deque<ll> de,pe,ne;
    ios_base::sync_with_stdio(false);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
    sieve();
    cin>>n;
    b = 0;
    f = 0;
    for(i=0; i<n; i++)
    {
        cin>>a;
        if(a%2==0)b++;
        if(i==0)d=a;
        else if(i>0)
        {
            d = __gcd(d,a);
        }
        ma[a]++;
        if(ma[a]>1)f=1;
    }
    if(f==1)cout<<"not coprime"<<endl;
    else if(d==1 && b>1)cout<<"setwise comprime"<<endl;
    else if(d!=1 && b>1)cout<<"not comprime"<<endl;
    else
    {
        f = 0;
        for(auto it = ma.begin();it!=ma.end();it++)
        {
          a= (*it).first;
          b  = spf[a];
          ar[b]++;
          if(ar[b]>1)f=1;
        }
        if(f==0)cout<<"pairwise coprime"<<endl;
        else if(d==1)cout<<"setwise coprime"<<endl;
        else cout<<"not coprime"<<endl;
    }

}
