#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define pi 3.141592653589793238
#define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define mod 1000000007
ll dx[4]={0,0,1,-1};
ll dy[4]={-1,1,0,0};
map<int,int> mp;

bool sieve(int x)
{
    for(int i=1;i*i<=x;i++)
    {
        if(x%i==0)
        {
            mp[i]++;
            if(mp[i]>1)
                return false;
            if(x/i!=i)
            {
                mp[x/i]++;
                if(mp[x/i]>1)
                    return false;
            }
        }
    }
    return true;
}


void solve()
{
    ll n;
    cin>>n;
    vector<ll> a(n);
    int g=0;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        g=gcd(g,a[i]);
    }
    int c=0;
    // cout<<g;
    for(int i=0;i<n;i++)
    {
        if(sieve(a[i])==false)
            c++;
    }
    if(c==0)
    {
        if(g==1)
            cout<<"pairwise coprime";
        else
            cout<<"not prime";   
    }   
    else
    {
        if(g==1)
            cout<<"setwise coprime";
        else
            cout<<"not coprime";
    }
        
        
    return;
}

int main()
{
	FAST;
    ll q;
    q=1;
    // cin>>q;
    while(q--)
        solve();
	return 0;
}