# Show that if $(m,n) = 1$, then $(a,mn) = (a,m)(a,n)$, and that $(mx + ny, mn) = (m,y)(n,x)$ for all integers $x,y$

I have gotten that $$(a,m)(a,n) | (a,mn)$$, but I'm not able to show that it is the greatest such divisor. The proof I have so far is as follows:

Let $$d_1 = (a,m)$$ and $$d_2 = (a,n)$$ so $$m = l_1d_1$$, $$n = l_2d_2$$, and $$a = j_1d_1 = j_2d_2$$. Since $$(m,n) = 1$$, we have \begin{align*} 1 &= mk_1 + nk_2\\ &= (l_1d_1)k_1 + (l_2d_2)k_2\\ &= (l_1k_1)d_1 + (l_2k_2)d_2, \end{align*} so $$(d_1, d_2) = 1$$. From above $$a = j_1d_1 = j_2d_2$$, and by Theorem 2.5, $$d_1 \mid j_2$$ and $$d_2 \mid j_1$$, so $$j_1j_2 \mid a$$.

(Where Theorem 2.5 states that if $$(a,b) = 1$$ and $$a \mid bc$$, then $$a \mid c$$)