def prime_factorize(n):
    global a
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    a = set(a)
    a = list(a)

N = input()
t = [int(s) for s in input().split()]
pairwise = int(1)
setwise = int(0)
lent = int(len(t))
p = set(t)
t = list(p)
lenp = int(len(t))
a = []

if lent != lenp:
    pairwise = 0

if 1 in t:
    t.remove(1)
    setwise = 1
    lenp -= 1

for i in range(lenp):
    if i == 0:
        prime_factorize(t[i])
        setlist = a
        pairlist = set(a)
    else:
        prime_factorize(t[i])
        lena = int(len(a))
        if pairwise == 1:
            for j in range(lena):
                if a[j] in pairlist:
                    pairwise = 0
                    break
                else:
                    pairlist.add(a[j])
        if pairwise == 0 and setwise == 0:
            setlen = int(len(setlist))
            aset = set(a)
            for j in range(setlen):
                if setlist[j] in aset:
                    pass
                else:
                    setlist.pop(j)
            if int(len(setlist)) == 0:
                setwise = 1

if pairwise == 1:
    print("pairwise coprime")
elif setwise == 1:
    print("setwise coprime")
else:
    print("not coprime")