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

def factorize(n: int) -> list:
    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

pairwize = True
alls = None
wize = None

for i in range(N):
    f = factorize(A[i])
    fs = set(f)
    # print(fs)

    if i == 0:
        wize = fs
        alls = fs
    else:
        if alls & fs:
            pairwize = False
        alls = alls | fs
        wize = wize & fs

if pairwize:
    print("pairwise coprime")
else:
    if wize:
        print("not coprime")
    else:
        print("setwise coprime")
