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

def numOfPairs(arr, n) : 
    count = 0
    for i in range(0, n-1) : 
        for j in range(i+1, n) : 
      
            if (math.gcd(arr[i], arr[j])==1) : 
                count = count + 1
    return count 

n=int(input())
arr=list(map(int,input().split()))
x=numOfPairs(arr,n)
pair=((n-1)*n)//2

if x==pair:
    print("pairwise coprime")
elif x==0:
    num1=arr[0] 
    num2=arr[1] 
    gcd1=find_gcd(num1,num2) 
    for i in range(2,n): 
        gcd1=find_gcd(gcd1,arr[i]) 
    if gcd1==1:
        print("setwise coprime")
    else:
        print("not coprime")
else:
    print("not coprime")