N = 1000001

spf = [*range(N)]
i = 2
while i * i < N:
  if spf[i] == i:
    for j in range(i * i, N, i):
      if spf[j] == j:
        spf[j] = i
  i += 1
  
t = 'pairwise', None, 'setwise', 'not'
r = 0
input()
u = set()
i = None
for x in map(int, input().split()):
  s = set()
  while x > 1:
    p = spf[x]
    if p in u:
      r |= 1
    s.add(p)
    x //= p
  u |= s
  if i: i &= s
  else: i = s
if not i:
  r |= 2
print(t[r], 'coprime')
