J/ψ, ψ′ and Drell-Yan production in pp and pd interactions at 450 GeV/c