from sys import exit
from math import gcd
n = int(input())
a = list(map(int, input().split()))
g = gcd(a[0], a[1])
for i in range(2, n):
	g = gcd(g, a[i])
if g > 1:
	print("not coprime")
	exit()

MAX = 32
nxt = [i for i in range(MAX)]
for i in range(2, MAX):
	if nxt[i] < i:
		continue
	for j in range(i, MAX, i):
		nxt[j] = min(nxt[j], i)

fac = set()
ok = True
for x in a:
	tmp = set()
	while x > 1:
		tmp.add(nxt[x])
		x //= nxt[x]
	for p in tmp:
		if p in fac:
			ok = False
			break
		fac.add(p)
	if not ok:
		break
print("pairwise coprime" if ok else "setwise coprime")