def find_gcd(num1,num2): 
    while(num2 != 0):
        temp = num2
        num2 = num1 % num2
        num1 = temp

    x= num1
    return x 
      
n=int(input())
a=input().split()
i=0
j=1
flag=1
while i<n-1:
    if j==n:
        i+=1
        j=i+1
    else:
        gcd=find_gcd(int(a[i]),int(a[j]))
        if gcd!=1:
            flag=0
            break
        j+=1
if  flag==1:
    print('pairwise coprime')
    
else:
    num1=int(a[0]) 
    num2=int(a[1]) 
    gcd=find_gcd(num1,num2) 
  
    for i in range(2,len(a)): 
        gcd=find_gcd(gcd,int(a[i])) 
    if gcd==1:
        print('setwise coprime')
    else:
        print('not coprime')
    