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

B = [0 for i in range(max(A)+1)]

for i in range(2, len(B)):
  if B[i] != -1:
    continue
  for j in range(i, len(B), i):
    B[j] = i

def func(X):
  buf = set()
  while X>1:
    x = B[X]
    buf.add(x)
    while X%x==0:
      X = X//x
  return buf

set1 = func(A[0])
set2 = set(set1)
totallen = len(set1)
for a in A[1:]:
  set3 = func(a)
  totallen += len(set3)
  set1.union(set3)
  set2.intersection(set3)
if len(set2)==0:
  print("not coprime")
elif len(set1)==totallen:
  print("pairwise coprime")
else:
  print("setwise coprime")