import math

input()
d = None
u = set()
r = 'pairwise'
for x in map(int, input().split()):
  d = math.gcd(d or x, x)
  s = set()
  i = 2
  while i * i <= x:
    while x % i == 0:
      if i in u:
        r = 'setwise'
      s.add(i)
      x //= i
    i += 1
  if x > 1:
    if x in u:
      r = 'setwise'
    s.add(x)
  u |= s
print((r, 'not')[d > 1], 'coprime')
