#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;

void solve()
{
	ll n;
	cin>>n;
	ll a[n];
	ll g;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
		/* code */
		if(i)
			g = __gcd(g,a[i]);
		else
			g = a[i];
	}
	if(g!=1)
	{
		cout<<"not coprime"<<endl;
		return;
	}
	map<ll,bool> m;
	bool flag = true;
	for (int i = 0; i < n; ++i)
	{
		ll x = a[i];
		set<ll> s;
		for(ll i = 2; i*i<= x; i++)
		{
			while(x%i==0)
			{
				x/=2;
				s.insert(i);
			}
		}
		if(x>1)
			s.insert(x);
		for(auto t:s)
		{
			if(m[t])
			{
				flag = false;
				break;
			}
			else
				m[t] = true;
		}
	}
	if(flag)
		cout<<"pairwise coprime"<<endl;
	else
		cout<<"setwise coprime"<<endl;

}

int main()
{
	ll t = 1;
	// cin>>t;
	while(t--)
	{
		solve();
	}
}