Prove if $(l,m)=1$ and $l\mid mn$, then $l\mid n$. I just took my number theory final and this was on the exam as the second question. It said to use the canonical decomposition of $l, m$ and $n$ for the proof. This is what I put down on the exam:
Proof
Let $l=p_1 p_2 p_3...p_n$ and $m=r_1 r_2 r_3...r_n$. Since $(l,m)=1$, $p_i \nmid r_i$ for all $i\in \Bbb{z}$. (Thinking, I should have stated it differently, maybe $p_a\nmid r_b$ for all $a, b \in\Bbb{z}$). Hence, $l\nmid m$.
Now, $mn=n r_1 r_2 r_3...r_n$ (now realizing poor choice in variable names) and since $l\nmid m$, then it must follow that $l\mid n$
$\blacksquare$ 
Question is whether or not this is a rigorous enough proof, or whether this makes any sense in general, otherwise how the proof should look?
 A: Since $(l,m)=1$ then by Bézout's identity there's $u,v$ s.t.
$$ul+vm=1\tag{1}$$
so multiplying $(1)$ by $n$ we find
$$uln+vmn=n\tag{2}$$
and since $l$ divides the LHS of $(2)$ then $l$ divides also $n$.
A: Let $l=p_1^{a_1} p_2^{a_2}\cdots p_x^{a_x}$, $m=q_1^{b_1} q_2^{b_2}\cdots q_y^{b_t}$, where the $p_i$ are distinct primes, also the $q_i$.  Note that the $p_i$ and $q_j$ are all distinct.  
Let $n=p_1^{c_1}\cdots p_x^{c_x} q_1^{d_1}\cdots q_y^{d_y} r_1^{e_1}\cdots r_z^{e_z}$. It is convenient to allow $0$ as an exponent. 
From $l|mn$, we conclude that $a_i \le c_i$ for all $i$ from $1$ to $x$ (just write down the prime power decomposition of $mn$).
It follows immediately that $l$ divides $n$. 
Remark: The general idea of the proof as prsented in the OP is OK. Certainly the fact you identified, that (in my notation) the $p_i$ and $q_j$ are distinct is crucial to the proof. The prime power decomposition should have been given, since the proof comes down to a comparison of exponents. It would have been useful to give the prime power decomposition of $n$. 
The proof using the Bezout identity is much simpler, at least typographically. But the prime power decomposition proof is more closely tied to intuition about  the multiplicative structure of the positive integers. 
