Suppose $x^a = x^b$ is integral for two integers $a,b$ and $\operatorname{gcd}(a,b) = 1$. Is $x$ an integer? This is the final step in my proof for a larger homework problem - if I can prove that this statement is true, then I have finished my other proof - however my mind has gone blank and I cannot solve this. Any pointers?
Suppose $x^a, x^b$ are integral for two positive integers $a,b$ and $\operatorname{gcd}(a,b) = 1$. Is $x$ an integer? 

Hint:
$$(a,b)=1\implies \exists\,n,m\in\Bbb Z\;\;s.t.\;\;na+mb=1\implies$$
$$x=x^{na+mb}=(x^a)^n\cdot(x^b)^m=(x^a)^n\cdot(x^a)^m=x^{a(n+m)}\ldots$$
