import math

n = int(input())
a_array = list(map(int, input().split()))

def factrization_prime(number):
    factor = {}
    div = 2
    s = math.sqrt(number)
    while div <= s:
        div_cnt = 0
        while number % div == 0:
            div_cnt += 1
            number //= div
        if div_cnt != 0:
            factor[div] = div_cnt
            ans_array[div] += 1
        div += 1
    if number > 1:
        factor[number] = 1
        ans_array[number] += 1
    return factor

thre = pow(10, 6) + 1
ans_array = [0] * thre

for a in a_array:
    factrization_prime(a)

max_ans_array = max(ans_array)
if max_ans_array == 1:
    print('pairwise coprime')
elif max_ans_array < n:
    print('setwise coprime')
else:
    print('not coprime')