n = int(input())
m=list(map(int,input().split()))
import math


d=m[n-1]

r=0


for i in range(n-2,-1,-1):
    d=math.gcd(m[i],d)
a=[1]*1000

for i in range(2,100):
    
    
    for j in range(i*i,1001,i):
        a[j-1]=0
k=[]
for i in range(1,1000):
    if a[i]==1:
        k.append(i+1)


for i in k:
    c=0
    for j in range(n):
        
        if m[j]%i==0:
            c+=1
            
    if c>1:
        r=1
        break
        
        













    
    
if d>1:
    print('not coprime')
elif r==1:
    print('setwise coprime')
else:
    print('pairwise coprime')

    