Two masses $M_{1}=5 \mathrm{~kg}$ and $M_{2}=10 \mathrm{~kg}$ are connected at the ends of an inextensible string passing over a frictionless pulley as shown. When the masses are released, then the acceleration of the masses will be
(a) $g$
(b) $g / 2$
(c) $g / 3$
(d) $g / 4$