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

def erat():
    tmp = [False if i == 0 or i == 1 else True for i in range(10 ** 3)]
    t = []
    for i in range(2, 10 ** 3):
        if tmp[i]:
            for j in range(2 * i, 10 ** 3, i):
                tmp[j] = False
            t.append(i)
    return t

t = erat()
a = dict(iter([(i, 0) for i in t]))

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

        if A[j] == 1:
            break

if max(a.values()) == 1:
    print('pairwise coprime')
elif max(a.values()) != N:
    print('setwise coprime')
else:
    print('not coprime')
