pps = []
d = [True for uu in range(100001)]
for u in range(2, 100000):
	if d[u]:
		c = 2
		while(c*u < 100000):
			d[c*u] = False
			c+=1
for uu in range(2,len(d)):
	if d[uu]:
		pps.append(uu)


n = raw_input()
def gcd(a,b):
	if b == 0:
		return a
	return gcd(b,a%b)



def f(ais):
	seen = set()
	bis = ais[::]
	flag=  True
	for ai in bis[::]:
		i = 0
		while(ai != 1):
			factor = pps[i]
			if ai % factor == 0:
				if factor in seen:
					flag = False
					break
				while(ai % factor == 0):
					ai /= factor
				seen.add(factor)
			i+=1 
	if flag:
		return 'pairwise coprime'
	if reduce(gcd, ais) == 1:
		return 'setwise coprime'
	return 'not coprime'
print f(map(int, raw_input().split()))