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, 1000):
    t = 0
    if tmp[i]:
        for j in A:
            if j % i == 0:
                t += 1

    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')
