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

#define ll long
#define endl "\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(NULL);

void solve()
{
	ll n;
	cin>>n;
	ll a[n];
	for(ll i=0;i<n;i++) cin>>a[i];
	
	ll gc=a[0];
	for(ll i=1;i<n;i++) gc=__gcd(gc,a[i]);
	
	if(gc!=1) 
	{
		cout<<"not coprime";
		return;
	}
	
	ll h=0;
	for(ll i=0;i<n;i++) h=max(h,a[i]);
	ll dd[h+1]={0};
	
	for(ll i=0;i<n;i++)
	{
		for(ll j=1;j<=sqrt(a[i]);j++)
		{
			if(a[i]%j==0)
			{
				dd[j]++;
				if(j!=a[i]/j) dd[a[i]/j]++;
			}
		}
	}
	for(ll i=h;i>1;i--)
	{
		if(dd[i]>1) 
		{
			cout<<"setwise coprime";
			return;
		}
	}
	cout<<"pairwise coprime";
}

int main()
{
	FAST
	ll t=1;
	//cin>>t;
	for(ll i=0;i<t;i++) solve();
	return 0;
}