#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define fi first
#define sec second
#define pr priority_queue
ll maxn = 1000003;
vector<ll> v;
void sieve()
{
	vector<bool> is(maxn, true);
	for (ll i = 4; i < maxn; i += 2)
		is[i] = false;
	for (ll i = 3; i * i < maxn; i++)
	{
		if (is[i])
		{
			for (ll j = i * i; j < maxn; j += i)
				is[j] = false;
		}
	}
	for (ll i = 2; i < maxn; i++)
	{
		if (is[i])
			v.push_back(i);
	}
	return ;
}
vector<ll> spf(maxn);
void prime()
{
	for (ll i = 1; i < maxn; i++)
		spf[i] = i;
	for (ll i = 4; i < maxn; i += 2) spf[i] = 2;
	for (ll i = 3; i * i < maxn; i++)
	{
		if (spf[i] == i)
		{
			for (ll j = i * i; j < maxn; j += i)
				if (spf[j] == j)
					spf[j] = i;
		}
	}
	return ;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	sieve();
	prime();
	ll n; cin >> n;
	vector<ll> vec(n);
	for (ll i = 0; i < n; i++)
		cin >> vec[i];
	set<ll> st;
	ll f = 0;
	for (ll i = 0; i < n; i++)
	{
		ll c = spf[vec[i]];
		if ((c != 1) && (st.find(c) != st.end()))
		{
			f = 1;
			break;
		}
		st.insert(c);
	}
	if (f)
	{
		ll gd = vec[0];
		for (ll i = 1; i < n; i++)
			gd = __gcd(gd, vec[i]);
		if (gd == 1)
			cout << "setwise coprime\n";
		else
			cout << "not coprime\n";
	}
	else
		cout << "pairwise coprime\n";
	return 0;
}