import math

N = int(input())
vals = [int(x) for x in input().split(" ")]

M = max(vals)
M_sqrt = int(math.sqrt(M))

count_list = [0 for _ in range(M_sqrt+1)]

S = 1

for i in range(2, M_sqrt+1):
  
  k = 0
  
  for v in vals:  

    if v%i==0:
      count_list[i]+=1
      count_list[v//i]+=1

if N in count_list:
  print("not coprime")
elif any([a>1 for a in count_list]):
  print("setwise coprime")
else:
  print("pairwise coprime")
  

