from sys import stdin

rInt       = lambda : int(stdin.readline().strip("\n"))
rIntArray  = lambda : [int(x) for x in stdin.readline().split()]

rString    = lambda : stdin.readline().strip("\n")
rStrArray  = lambda : [x for x in stdin.readline().split()]

# for _ in range(rInt()):

maxn = 10**6

n = rInt()
arr = rIntArray()

pairwise = True

present = [False]*(maxn + 1)
for i in arr: present[i] = True

for i in range(2, maxn + 1):
	cnt = 0
	for j in range(i, maxn + 1, i):
		if present[j]:
			cnt += 1
	if cnt > 1:
		pairwise = False

from math import gcd
g = 0
for i in arr: g = gcd(g, i)

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