I have this math question that I am kind of stuck on.
Show that if $\gcd(m_1,m_2) = 1$ and $n$ is an integer with $m_1\mid n$ and $m_2\mid n$, then $m_1m_2\mid n$, using unique factorization.
I'm not 100% how to start this. I already proved this using Bezout's identity. Thanks
Write $n=p_1^{a_1}p_2^{a_2}\dots p_k^{a^k}$ as product of prime powers ($p_1,\dots,p_k$ pairwise distinct and $a_i>0$).
Then you can write $$ m_1=p_1^{b_1}p_2^{b_2}\dots p_k^{b_k},\qquad m_2=p_1^{c_1}p_2^{c_2}\dots p_k^{c_k} $$ where $0\le b_i\le a_i$ and $0\le c_i\le a_i$ ($i=1,2,\dots,k$). Then $$ m_1m_2=p_1^{b_1+c_1}p_2^{b_2+c_2}\dots p_k^{b^k+c_k} $$ and $m_1m_2\nmid n$ implies $b_i+c_i>a_i$, for some $i$. In particular $b_i>0$ and $c_i>0$, so $p_i$ divides both $m_1$ and $m_2$.