import math

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

a=max(A)
def era(n):
  prime=[]
  furui=list(range(2,n+1))
  while furui[0]<math.sqrt(n):
    prime.append(furui[0])
    furui=[i for i in furui if i%furui[0]!=0]
  return prime+furui

b=A[0]
for i in range(1,N):
  b=math.gcd(b,A[i])

if b!=1:
  print("not coprime")
  exit()

furui=era(10**6+7)
dummy=[False]*(10**6+7)
for i in range(N):
  k=A[i]
  while k!=1:
    for j in furui:
      if k%j==0 and dummy[j-1]==True:
        print("setwise coprime")
        exit()
      elif k%j==0 and dummy[j-1]==False:
        dummy[j-1]=True
      while k%j==0:
        k//=j
print("pairwise coprime")