def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n = int(input())
a = list(map(int, input().split()))

lis = {}
lis2= [0]*(10**6+1)
flg1 = True

for i in range(n):
  temp =  make_divisors(a[i])
  for j in temp:
    if j == 1:
      continue
    """
    if not  j in lis:
      lis[j]=1
    else:
      flg1 = False
      lis[j]+=1
      if lis[j]==n:
        print("not coprime")
        quit()
    """
    lis2[j]+=1
    if lis2[j]>1:
      flg1 = False
      if lis2[j]==n:
        print("not coprime")
        quit()
    

if flg1:
  print("pairwise coprime")
else:
  print("setwise coprime")

