function main()
    data = readlines()
    N = parse(Int, data[1])
    A = parse.(Int, split(data[2]))
    pc = "pairwise coprime"
    sc = "setwise coprime"
    nc = "not coprime"
    gcd(A)≡1 && (return println(sc))
    for i in 1:length(A)-1
        for j in i+1:length(A)
            gcd(A[i], A[j])≠1 && (return println(nc))
        end
    end
    return println(pc)
end
main()