$\gcd(a,b)=1, x^a = y^b\Rightarrow x = n^b$, $ y = n^a$ for an integer $n$. If $ a$, $ b$, $ x$, $ y$ are integers greater than $1$ such that $ a$ and $ b$ have no common factor except $1$ and $ x^a = y^b$ show that $ x = n^b$, $ y = n^a$ for some integer $ n$ greater than $1$.
I started this way: $x^a=y^b$ $=>$ $x=y^{b/a}=(y^{1/a})^b$. Thus $x$ is an integer, and so is $y^{1/a}$, so $y=n^a$ for some integer $n$ greater than $1$. Then from the given relation, we get $x=n^b$. 
I am not very convinced with my solution, as I feel I did some mistake. Can anyone point out where the mistake is? Any other solution is also welcome :)

Mimic $\rm\color{#c00}{subtractive}$ Euclidean algorithm on $\color{#c00}{(a,b)}.\,$ Clear if $\,a\!=\!b\,$ by $\,a,b\,$ coprime $\Rightarrow\, a\!=\!b\!=\!1$
Else wlog $\,a > b\,$ therefore $\ x^{\large\color{#c00}{a-b}} = (y/x)^{\large \color{#c00}b}\,$ and $\,y/x\in\Bbb Z\,$ via Rational Root Test.
By induction we conclude:  $\, x = n^{\large b},\ y/x = n^{\large a-b} \Rightarrow\, y = n^{\large a}\ \ \ {\rm\small QED}$
