N = int(input())
A = list(map(int, input().split()))

def soinsu(a):
  result = []
  tmp = 2
  n = a
  while tmp <= a:
    if n%tmp == 0:
      result.append(tmp)
      while n%tmp == 0:
        n //= tmp
    tmp += 1
  return result

dict_prime = dict()
for a in A:
  for p in soinsu(a):
    if p in dict_prime.keys():
      dict_prime[p] += 1
    else:
      dict_prime[p] = 1

v = max(dict_prime.values())
if v == N:
  answer = 'not coprime'
elif v == 1:
  answer = 'pairwise coprime'
else:
  answer = 'setwise coprime'

print(answer)