GCD(n,m)=1 and a^m=b^n prove the existance of C included in IN* / a=C^n and b=c^m

GCD(n,m)=1 and a^m=b^n prove the existance of C included in IN* /
a=C^n and b=c^m

so I tried using Bezout identity: for u,v in ZI um +vn =1 multiply by n umn+vn*n =n which makes b^n = (b^u)^(mn) * (b^vn)^(n) does the c=(b^u) and I have to prove that (b^vn)^n I think i'm on the good reasoning

Fix a prime divisor $p\;$of $a$.

Then $p|a \implies p|a^m \implies p|b^n \implies p|b$.

Let $s$ be the exponent of $p\;$in the prime factorization of $a$, and let $t\;$be the exponent of $p\;$in the prime factorization of $b$.

Then $sm\;$is the exponent of $p\;$in the prime factorization of $a^m$, and $tn\;$is the exponent of $p\;$in the prime factorization of $b^n$.

Then $a^m = b^n\;$implies $sm=tn$, hence, since $m,n\;$are relatively prime, it follows that $n|s$.

Thus, in the prime factorization of $a$, the exponent of each prime factor is a multiple of $n$. It follows that $a\;$is a perfect $n$-th power.

Then $a = c^n\;$for some positive integer $c$, hence \begin{align*} &b^n = a^m\\[4pt] \implies\;&b^n= (c^n)^m\\[4pt] \implies\;&b^n= (c^m)^n\\[4pt] \implies\;&b = c^m\\[4pt] \end{align*} Thus, we have $a=c^n\;$and $b=c^m$, as was to be shown.