A rod of length L and of negligible mass is pivoted at a point that is off-center with lengths shown in the figure below. The figures show two cases in which masses are suspended from the ends of the rod. In each case the unknown mass m is balanced by a known mass, M1 or M2, so that the rod remains horizontal. What is the value of m in terms of the known masses?

(A) M1 + M2
(B) ½(M1 + M2)
(C) M1 M2
(D) ½M1M2
(E) √(M1 M2)