import sys
N = int(input())
A = list(map(int, input().split()))
A_max = max(A)
if A_max == 1:
    print("pairwise coprime")
    sys.exit()
dp = [0]*(A_max+10)
p = 0
s = 0
for i in range(2, max(int((A_max+1)**0.5)+1, 2)):
    c = 0
    if dp[i] == 0:
        dp[i] = 1
        for j in range(i, A_max+1, 2):
            if j % i == 0:
                dp[j] = 1
        for j in range(N):
            if A[j] % i == 0:
                c += 1
        if c >= 2:
            p = 1
        if c == N:
            s = 1
if p == 0:
    print("pairwise coprime")
elif s == 0:
    print("setwise coprime")
else:
    print("not coprime")