N = int(input())
#N = 1000000
A = list(map(int, input().split()))
#A = [i+1 for i in range(1000000)]
p = {2*i+1: 1 for i in range(1, 500)}
for i in range(3, 1000, 2):
  for j in p:
    if j != i:
      if j % i == 0:
        p[j] = 0
L = [2]
for i in p:
  if p[i] == 1:
    L.append(i)
def gcd(x, y):
  k, l = x, y
  while l:
    k, l = l, k % l
  return k
g = A[0]
for i in range(1, N):
  g = gcd(g, A[i])
  if g == 1:
    break
if g > 1:
  print("not coprime")
else:
  D = {}
  for i in range(N):
    pnt = 0
    while A[i] != 1:
      cnt = 0
      while A[i] % L[pnt] == 0:
        cnt = 1
        A[i] //= L[pnt]
      if cnt:
        if L[pnt] in D:
          D[L[pnt]] += 1
        else:
          D[L[pnt]] = 1
      pnt += 1
      if pnt == len(L) and A[i] != 1:
        if A[i] in D:
          D[A[i]] += 1
        else:
          D[A[i]] = 1
        break
  if D == {}:
    print("pairwise coprime")
  else:
    if max(D[i] for i in D) > 1:
      print("setwise coprime")
    else:
      print("pairwise coprime")