def computeGCD(x, y): 
  
   while(y): 
        x, y = y, x % y 
  
   return x 

n=int(input())
a=list(map(int,input("\nEnter the numbers : ").strip().split()))
lc=1
mu=1
gc=computeGCD(a[0],a[1])
for i in range(n):
    mu*=a[i]
    lc=(lc*a[i])/(computeGCD(lc,a[i]))
    gc=computeGCD(gc,a[i])
if(mu==lc):
    print("pairwise coprime")    
elif(gc==1):
    print("setwise coprime")
else:
    print("not coprime")