N,*A=map(int,open(0).read().split())

def prime_factorize(n):
    a = set()
    while n % 2 == 0:
        a.add(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.add(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.add(n)
    return a

prev=set()
pairwise=True
swd=prime_factorize(A[0])
for a in A:
    s=prime_factorize(a)
    if pairwise:
        if s.isdisjoint(prev):
            prev=s
        else:
            pairwise=False
    swd &= s
setwise=not pairwise and len(swd)==0
if pairwise:
    print('pairwise coprime')
elif setwise:
    print('setwise coprime')
else:
    print('not coprime')