from math import gcd

N = int(input())
A = list(map(int, input().split()))
sieve = [1] * (10**6+1)
for i in range(2, 10**3):
	if sieve[i] == 1:
		j = 2
		while(j * i <= 10**6):
			sieve[j * i] = 0
			j += 1
sieve[1] = 0
cnt = 0
for i in range(10**6+1):
	if sieve[i] == 1:
		cnt += 1

g = A[0]
for i in range(1, N):
	g = gcd(g, A[i])
	
if g != 1:
	print("not coprime")
else:
	if N > cnt:
		print("setwise coprime")
	else:
		for i in range(N):
			for j in range(i+1, N):
				if gcd(A[i], A[j]) != 1:
					print("setwise coprime")
					exit()
		print("pairwise coprime")