#include <bits/stdc++.h>
#define pb push_back
using namespace std;
ifstream f("A.in");
ofstream g("A.out");
typedef long long ll;
typedef pair<int,int> pi;
int t,T;
const int dim=1e6+10;
int viz[dim],n;
ll all,x,maxi;
bool pw,prim[dim];

void Sieve()
{
    prim[1]=1;
    for(int i=2;i*i<=maxi;i++)
    if(!prim[i])
    {
        int cnt=0;
        if(viz[i]) cnt=1;
        for(int j=i+i;j<=maxi;j+=i)
        {
            prim[j]=1;
            if(viz[j])cnt++;
        }

        if( cnt > 1 )
        {
            pw=1;
            return;
        }
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>x;
        maxi=max(maxi,x);
        if(!viz[x]) viz[x]=1;
        else
        if(x != 1) pw=1;

        if(i==1) all=x;
        else all=__gcd(all,x);
    }

    if( pw == 1 )
    {
        if(all==1) cout<<"setwise coprime";
        else cout<<"not coprime";
        return 0;
    }

    Sieve();

    if( pw == 1 )
    {
        if(all==1) cout<<"setwise coprime";
        else cout<<"not coprime";
    }
    else cout<<"pairwise coprime";

    return 0;
}
