function main()
    data = readlines()
    N = parse(Int, data[1])
    A = parse.(Int, split(data[2]))
    pc = "pairwise coprime"
    sc = "setwise coprime"
    nc = "not coprime"
    ret = []
    for i in 1:length(A)-1
        B = A[i+1:end]
        gcds = gcd.(A[i], B)
        append!(ret, gcds)
    end
    ret = unique(ret)
    r = length(ret)
    r==1 && return println(pc)
    return println(r==N ? sc : nc)
end
main()