Prime factorization problem... Here's the entire problem:

By considering the prime decomposition of $gcd( ab, n )$, show that if $a , b ,n$ are integers with $n$ relatively prime to both $a,b$ , then $n$ is relatively prime to $ab$.

Okay so I know how to do this via non-prime factorization. Here's my attempt at a start to this problem:

Proof
Given $a,b$ relatively prime to $n$, $\exists$ $s,t,u \in \mathbb{Z}$ s.t
$$as+nu=1$$
$$bt+nu=1$$
If we consider the prime factorization of $a,b,n$, we have primes $p_i,q_i,v_i$ s.t
$$a=\prod_{i=1}^r (p_i)^{n_i}$$
$$b=\prod_{i=1}^r (q_i)^{j_i}$$
$$n=\prod_{i=1}^r (v_i)^{\gamma_i}.$$
Note that $ab=(p_1)^{n_1}\cdot\cdot\cdot(p_r)^{n_r}(q_1)^{j_1}\cdot\cdot\cdot(q_r)^{j_r}$. Our result to ultimately prove is that $$abs+nu=1$$

Where do I go from here? I know how to progress without prime factorization, but that's not how the proof is supposed to be done :| If anyone could help, I'd be much obliged!
 A: As Greg Martin said, if you will use prime factorization arguments, there's no need to invoke Bézout's Lemma. 
The definition of $\gcd$ in terms of prime factorization is usually as follows. If the prime factorization of $a,b$ is given by
$$a=p_{1}^{\,\alpha_1}p_{2}^{\,\alpha_2}\,...$$
$$b=p_{1}^{\,\beta_1}p_{b_2}^{\,\beta_2}\,...$$
where $(p_1,p_2,...)$ = $(2,3,5,...)$, that is, the prime numbers, then:
$$\gcd(a,b)=p_1^{\,\min(\alpha_1,\beta_1)}p_2^{\,\min(\alpha_2,\beta_2)}\,...$$
With this, we can prove your statement. Using the above definitions:
$$ab=p_{1}^{\,\alpha_1+\beta_1}p_{2}^{\,\alpha_2+\beta_2}\,...$$
And let $n = p_1^{\,\nu_1}p_2^{\,\nu_2}\,...$ be the prime factorization of $n$. Since $n$ is relatively prime with $a$ and $b$, if $\alpha_k>0$ then $\nu_k=0$, and likewise, if $\beta_k > 0$, then $\nu_k = 0$. So, we have two cases to consider: 


*

*$\alpha_k+\beta_k=0$. In this case, since $\nu_k$ is a nonnegative integer, 
$\min(\alpha_k+\beta_k,\nu_k)=\min(0,\nu_k)=0$.

*$\alpha_k+\beta_k>0$. Then at least one of $\alpha_k$, $\beta_k$ is greater than zero. Either way, $\nu_k=0$ so $\min(\alpha_k+\beta_k,\nu_k)=\min(\alpha_k+\beta_k,0)=0$.
With this, we've proved that $\min(\alpha_k+\beta_k,\nu_k)=0$ for any $k\in \Bbb{N}$, so that:
$$\gcd(ab,n)=p_1^{\,\min(\alpha_1+\beta_1,\nu_1)}p_2^{\,\min(\alpha_2+\beta_2,\nu_2)}\,...=p_1^{\,0}p_2^{\,0}\,...=1\cdot1\,\cdot\,\,...=1$$
And so, $ab$ and $n$ are relatively prime by definition.
