import math

n = input()
lis = [int(a) for a in input().split(" ")]
lis_len = len(lis)
p_flag = True
s_flag = True

sqrt_max = int(math.sqrt(max(lis)))
for i in range(2, sqrt_max+1):
  mod_lis = [a % i for a in lis]
  non_zero_mod_lis = list(filter(lambda x:x!=0, mod_lis))
  if len(non_zero_mod_lis) <= lis_len-2:
    p_flag = False
  if len(non_zero_mod_lis) == 0:
    s_flag = False
    break
    
    
if p_flag:
  print("pairwise coprime")
elif s_flag:
  print("setwise coprime")
else:
  print("not coprime")