N = int(input())
A = list(map(int, input().split()))
tmp = [False if i == 0 or i == 1 else True for i in range(1000)]
p, s = True, True

for i in range(2, int(max(A) ** 0.5) + 1):
    t = 0
    if not tmp[i]:
        continue

    for j in range(N):
        if A[j] % i == 0:
            t += 1
            A[j] //= i

    for j in range(i * 2, 1000, i):
        tmp[j] = False

    if t >= 2:
        p = False

    if t == N:
        s = False
        break

print('pairwise coprime' if p else 'setwise coprime' if s else 'not coprime')