A body of mass $(2M)$ splits into four masses $\{m, M-m, m, M-m\}$, which are rearranged to form a square as shown in the figure. The ratio of $\frac{M}{m}$ for which, the gravitational potential energy of the system becomes maximum is $x:1$. The value of $x$ is $\_\_\_\_$.