A body of mass \( M \) at rest explodes into three pieces, in the ratio of masses \( 1:1:2 \). Two smaller pieces fly off perpendicular to each other with velocities of \( 30 \, \text{m s}^{-1} \) and \( 40 \, \text{m s}^{-1} \) respectively. The velocity of the third piece will be: