In the figure there is depicted a system that consists of two blocks and three weights of masses m1, m2 and M. The strings are non-stretchable and the masses of the strings and blocks are insignificant compared to the masses of the weights. The friction between a block and a string is insignificantly small. What has to be the value of M so that M would initially stay still when the system is let free?
\includegraphics[width = 0.3\linewidth] {2017-lahg-08-double_pulleys_img.pdf}