from math import gcd

def seachPrimeNum(N):
  max = int(N**0.5)
  seachList = [i for i in range(2,N+1)]
  primeNum = list(range(N+1))
  while seachList[0] <= max:
    tmp = seachList[0]
    tmp2 = list(seachList)
    for i in tmp2:
      if i%tmp == 0:
          primeNum[i]=tmp
          seachList.remove(i)
  return primeNum

def prime_factorize(n, f):
    a = []
    while n % f == 0:
        a.append(f)
        n //= f
    
    if f == 2:
      f=3
    else:
      f+=2
      
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
  
n = int(input())
a = list(map(int, input().split()))
d = seachPrimeNum(max(a))
dic = {}
g = a[0]
flg = True
for i in range(n):
  g = gcd(g, a[i])
  if flg:
    tmp = prime_factorize(a[i], d[a[i]])
    for j in set(tmp):
      if j in dic:
        flg = False
      else:
        dic[j]=1
        
if flg:
  print("pairwise coprime")
elif g == 1:
  print("setwise coprime")
else:
  print("not coprime")
  