import math

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

def get_primenumber(number):#エラトステネスの篩
    prime_list = []
    search_list = list(range(2,number+1))
    #search_listの先頭の値が√nの値を超えたら終了
    while search_list[0] <= math.sqrt(number):
        #search_listの先頭の値が√nの値を超えたら終了
        #search_listの先頭をprime_listに入れて、先頭をリストに追加して削除
        head_num = search_list.pop(0)
        prime_list.append(head_num)
        #head_numの倍数を除去
        for i in range(number // head_num):
            if D[head_num * (i + 1)] == -1:
                D[head_num * (i + 1)] = head_num
        search_list = [num for num in search_list if num % head_num != 0]
    #prime_listにsearch_listを結合
    prime_list.extend(search_list)
    return prime_list


def factrization_prime(number):
    div = D[number]
    s = math.sqrt(number)
    while div <= s:
        div_cnt = 0
        while number % div == 0:
            div_cnt += 1
            number //= div
        ans_array[div] += 1
        if number == 1:
            break
        div = D[number]
    if number > 1:
        ans_array[number] += 1

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

prime_list = get_primenumber(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')