
import math
def factorize(n):
	result = set()
	sqrt = math.floor(math.sqrt(n))
	i = 2
	while i <= sqrt:
		if n % i == 0:
			result.add(i)
			n //= i
			sqrt = math.floor(math.sqrt(n))
		else:
			i += 1
	if n > 1:
		result.add(n)
	return result

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

m = max(A_list)

prime_flag = [True] * (m + 1)
prime_flag[1] = False
prime_table = {}

for i in range(2, m + 1):
	if prime_flag[i]:
		prime_table[i] = len(prime_table)
		for j in range(i * 2, m + 1, i):
			prime_flag[j] = False

#print(prime_table)
table = [0] * len(prime_table)

for A in A_list:
	factors = factorize(A)
	for f in factors:
		table[prime_table[f]] += 1

c = max(table)

if c == 1:
	print("pairwise coprime")
elif c == N:
	print("not coprime")
else:
	print("setwise coprime")

