n = int(input())
ar = list(map(int, input().split()))

def gcd(a, b):
  return a if b == 0 else gcd(b, a % b)

def lcm(a, b):
  return a * b // gcd(a, b)

l, g, mul = 1, 0, 1
for i in ar:
  l = lcm(i, l)
  g = gcd(g, i)
  mul *= i

print('pairwise coprime' if l == mul else 'setwise coprime' if g == 1 else 'not coprime')