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[::]:
		factor =2
		while(ai != 1):
			if ai % factor == 0:
				if factor in seen:
					flag = False
					break
				while(ai % factor == 0):
					ai /= factor

				seen.add(factor)
			factor +=1
	if flag:
		return 'pairwise coprime'
	if reduce(gcd, ais) == 1:
		return 'setwise coprime'
	return 'not coprime'
print f(map(int, raw_input().split()))