#include<iostream>
#include<algorithm>
#include<bits/stdc++.h>
#define ll  long long int
#define mod 1000000007
using namespace std;
	#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<cmath>
#include<bitset>
#include<bits/stdc++.h>

#define ll long long int
#define N 1000005
using namespace std;
ll sieve[N];


void sievealgo()
{
    ll n=N;
    for(ll i=0;i<N;i++)
    	sieve[i]=1;
    sieve[0]=sieve[1]=0;
	sieve[2]=1;	
   for (ll x = 2; x <= N; x++) {
    if (sieve[x]==0) continue;
     for (ll u = 2*x; u <= n; u += x) {
        sieve[u] = 0;
    }
    }
//    for(ll i=1;i<20;i++)
//    	cout<<sieve[i]<<" ";
//    	cout<<endl;
}

main()
{
	sievealgo();
		ll n;
		cin>>n;
		
		ll a[n];
		for(ll i=0;i<n;i++)cin>>a[i];
		ll gcd = a[0];
		for(ll i=0;i<n;i++)
			gcd = __gcd(gcd,a[i]);
			ll tt=0,f=0;
			ll nop=0;
			ll p=0;
			for(ll i=0;i<n;i++)
			{
					if(sieve[a[i]]==1)
						nop++;
						else
						p++;
			}
			
//			cout<<nop<<endl;
			if(nop==n || nop==n-1 && gcd==1)
			{
				f=1;
			}
			if(f==1)
			{
				cout<<"pairwise coprime"<<endl;
						
						
			}
			
			if(f!=1)
			{
		if(gcd==1)
		{
			cout<<"setwise coprime"<<endl;
		}		
		else
		{
				cout<<"not coprime"<<endl;
		}
	}
}