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


def PrimeFactor(n):
  i = 2
  table = set()
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.add(i)
    i += 1
  if n > 1:
    table.add(n)
  return table

AND = set(PrimeFactor(A[0]))
d = {}
ans = -1
fin = False
for a in A:
    l = PrimeFactor(a)
    AND = AND & set(l)
    for x in l:
        if x in d:
            if d[x] >= 1:
                ans = 2
        else:
            d[x] = 1



if len(AND) == 0 and ans == -1:
    print("pairwise coprime")
elif len(AND)==0:
    print("setwise coprime")
else:
    print("not coprime")