N = int(input())
A = list(map(int, input().split()))
m = [0] * (10**6+2)

setwise = True
pairwise = True

for a in A:
    i = 1
    while(a / i > 1):
        if (a % i == 0):
            m[a//i] += 1
        i += 1

for i in range(2, 10**6+1):
    if m[i] >= 2:
        pairwise = False

    if m[i] == N:
        setwise = False
        break

if pairwise:
    print("pairwise coprime")
elif setwise:
    print("setwise coprime")
else:
    print("not coprime")
