$\operatorname{lcm}(n,m,p)\times \gcd(m,n) \times \gcd(n,p) \times \gcd(n,p)= nmp \times \gcd(n,m,p)$, solve for $n,m,p$? $\newcommand{\lcm}{\operatorname{lcm}}$
I saw this in the first Moscow Olympiad of Mathematics (1935), the equation was :
$$\lcm(n,m,p)\times \gcd(m,n) \times \gcd(n,p)^2 = nmp \times \gcd(n,m,p)$$
My attempt :
I've multiplied both sides of the equation by $\frac{1}{\gcd(n,m,p)}$ to get this ( I don't know why i did ):
$$\frac{\lcm(n,m,p)}{\gcd(n,m,p)}\times \gcd(m,n) \times \gcd(n,p)^2 = nmp$$
then I've multiplied both sides by $\gcd(n,m,p)$, I got this but I get stuck here  actually:
$$\frac{nmp\times \not{nmp}\times \gcd(m,n) \times \gcd(n,p)^2}{\gcd(n,m,p)}=\not{nmp}$$
Finally:
$$\gcd(m,n)\times \gcd(n,p)^2\times nmp=\gcd(n,m,p).$$

Using the standard trick: $$d=\gcd(n, m, p), u=\frac{\gcd(n, m)}{\gcd(n, m, p)}, v=\frac{\gcd(n, p)}{\gcd(n, m, p)}, w=\frac{\gcd(m, p)}{\gcd(n, m, p)}$$
we may write$\newcommand{\lcm}{\operatorname{lcm}}$
$$n=duvn_1, m=duwm_1, p=dvwp_1$$
where
$$\gcd(vn_1, wm_1)=\gcd(un_1, wp_1)=\gcd(um_1, vp_1)=1$$
This gives 
$$\gcd(u, v)=\gcd(u, w)=\gcd(v, w)=1$$
$$\gcd(n_1, m_1)=\gcd(n_1, p_1)=\gcd(m_1, p_1)=1$$
$$\gcd(u, p_1)=\gcd(v, m_1)=\gcd(w, n_1)=1$$
Then we have $$\lcm(n, m, p)=duvwn_1m_1p_1, \gcd(m, n)=du, \gcd(n, p)=dv, nmp=d^3u^2v^2w^2n_1m_1p_1$$
Thus the equation becomes
$$(duvwn_1m_1p_1)(du)(dv)^2=(d^3u^2v^2w^2n_1m_1p_1)d$$
$$v=w$$
Since $\gcd(v, w)=1$, $v=w=1$. Conversely if $v=w=1$ and all the $\gcd$ conditions above hold, then the given equation holds.
Thus all solutions are given by
$$n=dun_1, m=dum_1, p=dp_1$$
where $d, u, n_1, m_1, p_1$ are any positive integers satisfying 
$$\gcd(u, p_1)=\gcd(n_1, m_1)=\gcd(n_1, p_1)=\gcd(m_1, p_1)=1$$
