def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

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

k = set()
s = set(prime_factorize(list_A[0]))
cnt = 0

for a in list_A:
    l = prime_factorize(a)
    s = s & set(l)
    k = k | set(l)
    cnt += len(list(set(l)))

if cnt == len(list(k)):
    print("pairwise coprime")
elif len(list(s)) == 0:
    print("setwise coprime")
else:
    print("not coprime")