import math

n = int(input())
lst = [int(i) for i in input().split()]
lst.sort(reverse=True)
primes = set()
flag = True
for i in range(n):
  if not flag:
    break
  num = lst[i]
  count = 0
  while num % 2 == 0:
    num //= 2
    count += 1
    if pow(2, count) in primes:
      flag = False
      break
    primes.add(pow(2, count))
  f = 3
  while f <= math.sqrt(num) and flag:
    count = 0
    while num % f == 0:
      num //= f
      count += 1
      if pow(f, count) in primes:
        flag = False
        break
      primes.add(pow(f, count))
    f += 2
if not flag:
  a = lst[0]
  for i in range(1, n):
    b = lst[i]
    c = math.gcd(a, b)
    a = c
  if a != 1:
    print('not coprime')
  else:
    print('setwise coprime')
else:
  print('pairwise coprime')