from collections import Counter


def factorize(num):
    array = []
    tmp = num
    now = 2
    while now ** 2 <= num:
        if tmp % now == 0:
            while tmp % now == 0:
                tmp //= now
            array.append(now)
        now += 1
    if tmp != 1:
        array.append(tmp)
    if len(array) == 0:
        array.append(num)
    return array


N = int(input())
A = list(map(int, input().split()))
all_list = []
set_diff = set()
for i in A:
    fac = factorize(i)
    set_diff = set_diff ^ set(fac)
    all_list.extend(fac)
# print(Counter(all_list))
if Counter(all_list).most_common()[0][1] == 1:
    print("pairwise coprime")
elif len(set_diff) == 0:
    print("setwise coprime")
else:
    print("not coprime")
