N = int(input())
A = [0]*(100001)
IIL = list(map(int, input().split()))
for a in IIL:
    A[a] += 1

# MFPF = Most Frequent Prime Factor
MFPF_n = 0
for i in range(2, 100001):
    n = i
    tmp = 0
    while n < 100001:
        tmp += A[n]
        n += i
    MFPF_n = max(MFPF_n, tmp)

if MFPF_n < 2:
    print('pairwise coprime')
elif MFPF_n - A[1] < N:
    print('setwise coprime')
else:
    print('not coprime')