import math
from functools import reduce
 
def gcd_lis(lis):
    return reduce(math.gcd, lis)

def osa_k(max_num):
  lis = [i for i in range(max_num+1)]
  p = 2
  while p**2 <= max_num:
    if lis[p] == p:
      for q in range(2*p, max_num+1, p):
        if lis[q] == q:
          lis[q] = p
    p += 1
  return lis

N = int(input())
num_lis = list(map(int, input().split()))
c1 = True
c2 = True

d_lis = osa_k(max(num_lis))
tmp = set()
for i in num_lis:
  num = i
  new_tmp = set()
  while num > 1:
    d = d_lis[num]
    new_tmp.add(d)
    num //= d
  #print(new_tmp)
  if len(tmp)+len(new_tmp) == len(tmp | new_tmp):
    tmp |= new_tmp
    continue
  else:
    c1 = False
    break
  
if gcd_lis(num_lis) != 1:
  c2 = False

if c1:
  print("pairwise coprime")
elif not c1 and c2:
  print("setwise coprime")
else:
  print("not coprime")