def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

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

lis = {}
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()
      
if flg1:
  print("pairwise coprime")
else:
  print("setwise coprime")