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

pairwise = True
setwise = False


seki = 1
for i in range(N):
    seki *= A[i]
tmp = 0

for j in range(N):
    gcd = fractions.gcd(A[j],seki//A[j])
    if gcd != 1:
        pairwise = False
        if tmp == 0:
            tmp = gcd
        else:
            tmp = fractions.gcd(gcd,tmp)

    else:
        setwise = True

if tmp == 1:
    setwise = True

if pairwise:
    print('pairwise coprime')
elif setwise:
    print('setwise coprime')
else:
    print('not coprime')


