Pirates hit 5 HRs, back Locke in 9-4 win over M's