import math

N = int(input())

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

gcdAll = A[0]
isPairwise = True

for j in range(1, N):
    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')