import numpy as np
N = int(input())
Ai = list(map(int, input().split(" ")))
pairwiseI = False
for i in range(N - 1):
    for k in range(i + 1, N):
        if np.gcd(Ai[i], Ai[k]) != 1:
            pairwiseI = True
if (not pairwiseI) == True:
    print("pairwise coprime")
else:
    gcdall = Ai[0]
    for i in range(1, N):
        gcdall = np.gcd(gcdall, np.gcd(Ai[i-1], Ai[i]))
    if gcdall == 1:
        print("setwise coprime")
    else:
        print("not coprime")