n = int(input())
a = list(map(int, input().split()))
pc = True
sc = False
x1 = 0
x2 = 0
x3 = a[0]
for i in range(n):
  for j in range(i + 1, n):
    if a[i] > a[j]:
      x1, x2 = a[i], a[j]
    else:
      x1, x2 = a[j], a[i]
    while True:
      if x3 > x1:
        x3 = x1
      if x2 == 1:
        break
      elif x2 == 0:
        pc = False
        break
      x1, x2 = x2, x1 % x2
for k in range(n):
  if a[k] % x3 != 0:
    sc = True
if pc:
  print("pairwise coprime")
else:
  if sc:
    print("setwise coprime")
  else:
    print("not coprime")