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)]
    for i in range(2, 10 ** 3):
        if tmp[i]:
            for j in range(2 * i, 10 ** 3, i):
                tmp[j] = False
            yield i

a = {}
for i in erat():
    for j in range(N):
        if A[j] % i == 0:
            while not A[j] % i:
                A[j] //= i
            if i in a:
                a[i] += 1
            else:
                a[i] = 1

for i in range(N):
    if A[i] != 1:
        if A[i] in a:
            a[A[i]] += 1
        else:
            a[A[i]] = 1

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