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

def findMaxGCD(arr, n) : 
      
    # Calculating MAX in 
    # array 
    high = 0
    for i in range(0, n) : 
        high = max(high, arr[i]) 
  
    # Maintaining count array 
    count = [0] * (high + 1) 
    for i in range(0, n) : 
        count[arr[i]]+=1
  
    # Variable to store the 
    # multiples of a number 
    counter = 0
  
    # Iterating from MAX 
    # to 1 GCD is always  
    # between MAX and 1 
    # The first GCD found 
    # will be the highest  
    # as we are decrementing 
    # the potential GCD 
    for i in range(high, 0, -1) : 
        j = i 
  
        # Iterating from current  
        # potential GCD till it  
        # is less than MAX 
        while (j <= high) : 
  
            # A multiple found 
            if (count[j] >0) : 
                counter+=count[j]     
  
            # Incrementing potential 
            # GCD by itself 
            # To check i, 2i, 3i.... 
            j += i 
  
            # 2 multiples found,  
            # max GCD found 
            if (counter == 2) : 
                return i 
        counter=0
pair = findMaxGCD(arr, len(arr)) 

# Driver Code         
size = int(input())
arr = [int(i) for i in input().split()]

num1 = int(arr[0]) 
num2 = int(arr[1]) 
gcd = find_gcd(num1, num2) 
  
for i in range(2, len(arr)): 
    gcd = find_gcd(gcd, int(arr[i])) 
      
whole = gcd 

if(pair!=1 and whole ==1):
  print("setwise coprime")

elif(pair==1 and whole ==1):
  print("pairwise coprime")

elif(whole!=1):
  print("not coprime")

