using Primes
function main()
    n=myread(Int)
    a=myreads(Int)
    cnt=Dict{Int,Int}()
    for i=a
        for j=keys(factor(i))
            if haskey(cnt,j)
                cnt[j]+=1
            else
                cnt[j]=1
            end
        end
    end
    if all(x->x==1,values(cnt))
        println("pairwise coprime")
    else
        g=a[1]
        for i=a
            g=gcd(g,i)
        end
        if g==1
            println("setwise coprime")
        else
            println("not coprime")
        end
    end
    println(cnt)
end

# ----------input function----------
sread()=chomp(readline())
sreads(sp=" ")=split(readline(),sp)
myread(ty)=parse(ty,sread())
myreads(ty)=parse.(ty,sreads())
main()