n=int(input())
a=list(map(int,input().split()))

s=set()
f=1
for x in a:
	if f==0:
		break
	if x>1:
		r=int(x**0.5+1e-8)+1
		for i in range(2,r):
			if x%i==0:
				while x%i==0:
					x//=i
				if i in s:
					f=0
					break
				else:
					s.add(i)
		if x>1:
			if x in s:
				f=0
				break
			else:
				s.add(x)

if f:
	print("pairwise coprime")
	exit()
p=a[0]
from math import gcd
for x in a:
	p=gcd(p,x)
if p==1:
	print("setwise coprime")
else:
	print("not coprime")

