from math import gcd

N = int(input())
A = list(map(int, input().split()))

v = 0
for a in A: v = gcd(a, v)
if v > 1:
	print('not coprime')
	raise SystemExit


primes = [2, 3, 5, 7]
for i in range(9, 10**3, 2):
	for v in primes:
		if v % i == 0: break
	else:
		primes.append(i)

V = [False] * len(primes)
for v in A:
	for i, p in enumerate(primes):
		if v % p == 0:
			if V[i]:
				print('setwise coprime')
				raise SystemExit
			else:
				V[i] = True

print('pairwise coprime')
