#include <bits/stdc++.h>
typedef long long ll;
#define mod 1000000007
using namespace std;

ll fact[1000001];
bool already=false;
void check(int n)
{   ll a,b;
    if(already==true||fact[n]>0)
        return;
    fact[n]++;
    for(ll j=2;j*j<=n;j++)
    {
        if(n%j==0)
        {
            a=j;
            b=n/j;
        if(fact[a]>0||fact[b]>0)
        {
            already=true;
            return;
        }
        else
        {
            if(a==b)
                fact[a]++;
            else
            {
                fact[a]++;fact[b]++;
            }
        }
        }

    }
}
int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("outp.txt","w",stdout);
    #endif
    ll n,i,c,j,f=0;
    cin>>n;
    vector<ll> v(n);
    for(i=0;i<n;i++)
        cin>>v[i];
    ll gcd=v[0];
    check(v[0]);
    for(i=1;i<n;i++)
    {
        check(v[i]);
        gcd=__gcd(gcd,v[i]);
    }
    if(gcd==1)
        cout<<"setwise coprime";
    else if(already==false)
        cout<<"pairwise coprime";
    else
        cout<<"not coprime";
}

    
