from math import gcd
def findMaxGCD(arr, n) : 
    high = 0
    for i in range(0, n) : 
        high = max(high, arr[i])  
    count = [0] * (high + 1) 
    for i in range(0, n) : 
        count[arr[i]]+=1
    counter = 0
    for i in range(high, 0, -1) : 
        j = i 
        while (j <= high) : 
            if (count[j] >0) : 
                counter+=count[j]     
            j += i 
            if (counter == 2) : 
                return i 
        counter=0

n = int(input())
s = input().split(" ")
s =  [int(x) for x in s]

if findMaxGCD(s, n) == 1:
    print("pairwise coprime")
else:
    ans = 0
    for c in s:
        ans  = gcd(ans, c)
    if ans ==1:
        print("setwise coprime")
    else:
        print("not coprime")