<s>[INST] Prove that $~~a=b=c~~$ if $\frac{a}{b}+\frac{b}{c}+\frac{c}{a}$ and $\frac{a}{c}+\frac{b}{a}+\frac{c}{b}$ are integers. 
Prove that $~~a=b=c~~$ if  $\frac{a}{b}+\frac{b}{c}+\frac{c}{a}$ and $\frac{a}{c}+\frac{b}{a}+\frac{c}{b}$  are integers.

My first attempt was to add $~\frac{a}{b}+\frac{b}{c}+\frac{c}{a}$ and $~\frac{a}{c}+\frac{b}{a}+\frac{c}{b}$ together and I got that $\frac{(a+b)(b+c)(c+a)}{abc}$ is an integer. I was not able make any further progress from here.
Then I tried by multiplying them both.
I got $~\left(\frac{a}{b}+\frac{b}{c}+\frac{c}{a} \right) \left(\frac{a}{c}+\frac{b}{a}+\frac{c}{b}\right)=3+\frac{a^2}{bc}+\frac{bc}{a^2}+\frac{b^2}{ac}+\frac{ac}{b^2}+\frac{c^2}{ab}+\frac{ab}{c^2}$.
I was able to prove $~\frac{a^2}{bc}+\frac{bc}{a^2}+\frac{b^2}{ac}+\frac{ac}{b^2}+\frac{c^2}{ab}+\frac{ab}{c^2}$ is a integer but still could not make any progress.
Then I tried squaring $~\frac{a}{b}+\frac{b}{c}+\frac{c}{a}$.
I got $~~\left(\frac{a}{b}+\frac{b}{c}+\frac{c}{a}\right)^2=\frac{a^2}{b^2}+\frac{b^2}{c^2}+\frac{c^2}{a^2}+2\left(\frac{a}{c}+\frac{b}{a}+\frac{c}{b}\right)$ .
So I was able to prove $~\frac{a^2}{b^2}+\frac{b^2}{c^2}+\frac{c^2}{a^2} $ and $~\frac{a^2}{c^2}+\frac{b^2}{a^2}+\frac{c^2}{b^2}$ is an integer.
Using the same method I proved $~\frac{a^{2^k}}{b^{2^k}}+\frac{b^{2^k}}{c^{2^k}}+\frac{c^{2^k}}{a^{2^k}} $ and $~\frac{a^{2^k}}{c^{2^k}}+\frac{b^{2^k}}{a^{2^k}}+\frac{c^{2^k}}{b^{2^k}}$ is an integer although it was of no use.
I don't know how to proceed further. Any help would be appreciated.
 [/INST] Note that this is false when $a,b,c$ aren’t integers, so we need to use that fact.
Let $p$ be prime. Let $x,y,z$ be the largest so that $p^x|a,p^y|b,p^z|c$.
If $a,b,c$ are all different then there’s some $p$ such that the corresponding $x,y,z$ aren’t the same. Either one is larger than the other two or one is smaller than the other two. In the first case, WLOG $x>y \geq z$. Then, $p$ doesn’t divide the numerator of $p^{x-y} b/a$ but does for $p^{x-y} c/b$ and $p^{x-y} a/c$, so it doesn’t divide the numerator of $p^{x-y}(b/a+c/b+a/c)$, so p is in the numerator of a reduced $b/a+c/b+a/c$, so it’s not an integer.
The case when one is smaller than the others is similar.
Thus, $a=b=c$.
</s>