function GCD(a,b)
    return b!=0 ? GCD(b,a%b) : a
end

function main()
    n=parse.(Int,readline())
    A=parse.(Int,split(readline()))
    setwise=false
    pairwise=true
    all_gcd=A[1]
    for i=2:n
        all_gcd=GCD(all_gcd,A[i])
    end
    if all_gcd==1
        setwise=true
    end
    A_max=maximum(A)
    hurui=zeros(Int,A_max+10)
    for i=1:n
        hurui[A[i]]+=1
    end
    for i=2:A_max+10
        j=i
        cnt=0
        while j<=A_max+10
            if hurui[j]==true
                cnt+=hurui[j]
            end
            j+=i
        end
        if cnt>1
            pairwise=false
        end
    end
    if pairwise
        println("pairwise coprime")
    elseif setwise
        println("setwise coprime")
    else
        println("not coprime")
    end
end
main()


