import math

N = int(input())

A = list(set(list(map(int, input().split()))))
A.sort()
gcdAll = A[0]
isPairwise = True
if len(A) != N:
    isPairwise = False

if len(A) > (10**6/2):
    gcdAll = 0
    isPairwise = False
else:
    for j in range(1, len(A)):
        gcdAll = math.gcd(gcdAll, A[j])
        if not isPairwise:
            continue
        for i in range(0, j):
            gcdNow = math.gcd(A[i], A[j])
            if gcdNow != 1:
                isPairwise = False
                break

if isPairwise:
    print('pairwise coprime')
elif gcdAll == 1:
    print('setwise coprime')
else:
    print('not coprime')