import bisect

n = int(input())
As = list(map(int, input().split()))
As.sort()

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

cons = 10 ** 6
Ps = primes(cons)
Pset = set(Ps)
flags = [[0 for _ in range(n)] for _ in range(len(Ps))]
pairwiseFlag = True
setwiseFlag = True

# for p in Ps: # 素数
#   index = bisect.bisect_left(As, p)
#   temp = 0
#   for a in As[index:]:
#     if a in Pset:
#       temp += 1
#   if temp >= 2:
#     pairwiseFlag = False
#   if temp == n:
#     setwiseFlag = False
for ia, a in enumerate(As):
  index = bisect.bisect_right(Ps, a)
  temp = 0
  for ip, p in enumerate(Ps[:index]):
    if a % p == 0:
      flags[ip][ia] = 1
for i in range(len(Ps)):
  s = sum(flags[i])
  if s >= 2:
    pairwiseFlag = False
  if s == n:
    setwiseFlag = False

if pairwiseFlag:
  print('pairwise coprime')
elif setwiseFlag:
  print('setwise coprime')
else:
  print('not coprime')
