import math

N = int(input())

A = list(map(int, input().split()))
A.sort()
gcdAll = A[0]
isPairwise = True
check = set()
check.add(gcdAll)
for aj in A[1:]:
    if aj in check:
        continue
    gcdAll = math.gcd(gcdAll, aj)
    if not isPairwise:
        continue
    for ai in check:
        gcdNow = math.gcd(ai, aj)
        if gcdNow != 1:
            isPairwise = False
            break
    check.add(aj)

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