N = int(input())
A = tuple(map(int, input().split()))

count = 0
done = set()
ppdone = set(range(N))
for n in A:
    pdone = set()
    dup = False
    a = 2
    while a * a <= n:
        if n % a == 0:
            while n % a == 0:
                n //= a
            if a in done:
                dup = True
            else:
                done.add(a)
            if a in ppdone:
                pdone.add(a)
        a += 1
    if n != 1:
        if n in done:
            dup = True
        else:
            done.add(n)
        if n in ppdone:
            pdone.add(n)
    ppdone = pdone
    if dup:
        count += 1
if count == 0:
    print("pairwise coprime")
elif ppdone:
    print("not coprime")
else:
    print("setwise coprime")