#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 1000000000
#define mod 1000000007
vector<ll> primes;
bool isprime[1000006];

void seive()
{
	isprime[0]=0;
	isprime[1]=0;
	for(ll i=2;i<1000005;++i)
	{
		if(!isprime[i])
		{
			primes.push_back(i);
			for(ll j=i*i;j<1000005;j+=i)	isprime[j]=true;
		}
	}

}

ll pairs(ll x)
{
	return x*(x-1)/2;
}

int main()
{
	ll n;
	cin>>n;
	ll a[n];
	ll g;
	cin>>a[0]>>a[1];
	g = __gcd(a[0],a[1]);
	for(ll i=2;i<n;++i)	
	{
		cin>>a[i];
		g = __gcd(g,a[i]);
	}
	if(g!=1)
	{
		cout<<"not coprime\n";
		return 0;
	}

	seive();
	
	ll m = *max_element(a,a+n);
	ll f=0;
	for(ll i=0;i<primes.size();++i)
	{
		if(primes[i]>m)	break;
		ll x=0;
		for(ll j=0;j<n;++j)	if((a[j]%primes[i]) == 0)	{x++; if(x>1)	break;}
		if(x>1){f=1;break;}
	}
	if(f)	cout<<"setwise coprime\n";
	else	cout<<"pairwise coprime\n";

}