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

#define ll long long
#define print(r) cout << r << endl
#define prints(r) cout << r << " "
#define printline cout << endl

#define lim (ll)(1e6 + 1)

int main()
{
	ll n;
	cin >> n;
	vector<ll> arr(lim, 0);
	int pc = 1, sc = 1;
	ll t;
	for (ll i = 0; i < n; i++)
	{
		cin >> t;
		arr[t] = 1;
		if (arr[t] > 1 && t != 1)
			pc = 0;
	}

	ll gcd = t;
	for (ll i = 0; i < lim; i++)
	{
		if (arr[i])
			gcd = __gcd(gcd, i);
	}
	if (gcd != 1)
		sc = 0;
	if (pc == 1)
	{
		for (ll i = 2; i < lim; i++)
		{
			ll d = 0;
			if (arr[i])
				d = 1;
			for (ll j = i + i; j < lim; j += i)
			{
				if (arr[j])
				{
					d++;
				}
			}
			if (d > 1)
				pc = 1;
		}
	}
	if (pc)
		print("pairwise coprime");
	else if (sc)
		print("setwise coprime");
	else
		print("not coprime");

	return 0;
}