#include <bits/stdc++.h>
using namespace std;
#define ll long long int 
#define ld double
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define ff first
#define ss second
#define pll pair <ll,ll>
#define nl "\n"
const int L = 1000006;
ll spf[L];
ll soe()
{
	ll i,j;

	spf[1]=1;
	for(i=2;i<=L;i++)
	{
		if(spf[i]==0)
		{
			for(j=i;j<=L;j+=i)
			{
				if(spf[j]==0)
					spf[j]=i;
			}
		}
	}
}
unordered_map<ll,ll> factorise(ll x)
{
	unordered_map<ll,ll> mq;
	while(x>1)
	{
		mq[spf[x]]++;
		x=x/spf[x];
	}
	return mq;
} 
int main()
{
	ios_base::sync_with_stdio(false);
	ll n,i;
	soe();
	cin>>n;
	ll a[n+2];
	for(i=0;i<n;i++)
		cin>>a[i];
	ll gcd=a[0];
	for(i=1;i<n;i++)
		gcd = __gcd(gcd, a[i]);
	unordered_map <ll,ll> x;
	for(i=0;i<n;i++)
	{
		unordered_map <ll,ll> sub = factorise(a[i]);
		for(auto y:sub)
		{
			x[y.ff] += y.ss;
		}
	}
	ll ff=0;
	for(i=0;i<n;i++)
	{
		unordered_map <ll,ll> sub = factorise(a[i]);
		ll f=0;
		for(auto y:sub)
		{
			ll p = x[y.ff] - y.ss;
			if(p!=0)
			{
				f=1;
				break;
			}
		}
		if(f==1)
		{
			ff=1;
			break;
		}
	}
	if(ff==0)
		cout<<"pairwise coprime";
	else if(gcd==1)
		cout<<"setwise coprime";
	else
		cout<<"not coprime";
	cout<<nl;
	// unordered_map <ll,ll> x = factorise(35280);
	// for(auto y:x)
	// 	cout<<y.ff<<" "<<y.ss<<nl;

	return 0;
}