import math 
def findMaxGCD(arr, n): 
    high = max(arr) 
    divisors = [0] * (high + 1) 
    for i in range(n) : 

        for j in range(1, int(math.sqrt(arr[i])) + 1): 

            if (arr[i] % j == 0) : 

                divisors[j] += 1
                if (j != arr[i] // j): 
                    divisors[arr[i] // j] += 1
                    
    pairwise_coprime=True
    setwise_coprime=True
    for i in range(2,high):
        if (divisors[i] >= 2): 
            pairwise_coprime=False
        if divisors[i]==n:
            setwise_coprime=False
    if pairwise_coprime:
        print('pairwise coprime')
    elif setwise_coprime:
        print('setwise coprime')
    else:
        print('not coprime')
            
n = int(input())
a= [int(i) for i in input().split()]
findMaxGCD(a, n)
 
