#include<bits/stdc++.h>
#define ll long long
using namespace std;
set<ll> fact(ll z)
{
	set<ll> ret;
	for(ll j=2;j*j<=z;j++)
	{
		while(z%j==0)
			z/=j,ret.insert(j);
	}
	if(z!=1)
		ret.insert(z);
	return ret;
}
int main()
{
	ll n;
	cin>>n;
	ll a[n];
	bool pairwise=1;
	set<ll> allfactors;
	ll g=a[0];
	for(ll p=0;p<n;p++)
	{
		cin>>a[p];
	}
	for(ll p=0;p<n;p++)
	{
		if(p>0)
			g=__gcd(a[p],g);
	}
		
	for(ll k=0;k<n;k++)
	{
		if(pairwise)
		{
			set<ll> prime_factors=fact(a[k]);
			for(auto df:prime_factors)
			{
				if(allfactors.count(df))
				{
					pairwise=0;
					break;
				}
				else
				{
					allfactors.insert(df);
				}
			}
		}
	}
	if(pairwise)
	{
		cout<<"pairwise coprime"<<endl;
	}
	else if(g==1)
	{
		cout<<"setwise coprime"<<endl;
	}
	else
	{
		cout<<"not coprime"<<endl;
	}
}