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()))
list_S = []

for a in list_A:
    list_S.append(list(set(prime_factorize(a))))

g = set()
cnt = 0
k = set(list_S[0])

for l in list_S:
    g = g | set(l)
    cnt += len(l)
    k = k & set(l)

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