import math

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

input()
d = None
u = set()
r = 'pairwise'
for x in map(int, input().split()):
  d = math.gcd(d or x, x)
  s = pf(x)
  if not s.isdisjoint(u):
    r = 'setwise'
  u |= s
print((r, 'not')[d > 1], 'coprime')
