N=int(input())
A=list(map(int,input().split()))

def factorization(n):
    arr = set()
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.add(i)

    if temp!=1:
        arr.add(temp)

    if arr==[]:
        arr.add(n)

    return arr

com={}
rem={}

for i in range(N):
  if i ==0:
    rem=factorization(A[i])
  else:
    rem=rem&factorization(A[i])

for i in range(N):
  if i ==0:
    com=factorization(A[i])
  else:
    if com&factorization(A[i])==set() or com&factorization(A[i])=={1}:
      com=com.union(factorization(A[i]))
    else:
      com={0}
      break
    
if com!={0}:
  print("pairwise coprime")
elif rem==set() or rem=={1}:
  print("setwise coprime")
else:
  print("not coprime")