n = int(input())
A = tuple(map(int, input().split()))
fact_or = set()
fact_counts = [1] * (10**6+1)
def fact(n):
    exists = False
    if n%2 == 0 and 2 in fact_or:
        fact_counts[2] += 1
        exists = True
    while n%2 == 0:
        fact_or.add(2)
        n //=2

    for f in range(3, int(n**0.5)+ 1, 2):
        if n%f == 0 and f in fact_or:
            exists = True
        while n%f == 0:
            if f in fact_or:
                fact_counts[f] += 1
                exists = True
            fact_or.add(f)
            n //= f
    if n != 1:
        if n in fact_or:
            fact_counts[n] += 1
            exists = True
        fact_or.add(n)
    return exists

fact(A[0])
pairwise = True
for a in A[1:]:
    exists = fact(a)
    if exists:
        # 今まで出てきた素因数と共通するものが見つかったらpairwiseではない
        pairwise = False

if pairwise:
    print('pairwise coprime')
else:
    if max(fact_counts) == n:
        print('not coprime')
    else:
        # すべてに共通する素因数が見つからなかったら
        print('setwise coprime')