N = int(input())
A = list(map(int, input().split()))
p, s = True, True

def erat():
    tmp = [False if i == 0 or i == 1 else True for i in range(10 ** 6)]
    for i in range(2, 10 ** 6):
        if tmp[i]:
            for j in range(2 * i, 10 ** 6, i):
                tmp[j] = False
            yield i

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

    if t >= 2:
        p = False

    if t == N:
        s = False
        break

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