<s>[INST] If both the sum and sum of squares of two rationals are integers, the two rationals are integers too There are two rational numbers $\alpha, \beta$ such that $\alpha + \beta,\ \alpha^2 + \beta^2$ are both integers. Prove that $\alpha, \beta$ are integers.
I started off by assuming that $\alpha = \frac{a}{b}, \beta = \frac{c}{d}$ such that $\gcd(a, b) = \gcd(c, d) = 1$ and $b, d \neq 1$. 
$\frac{a}{b} + \frac{c}{d}$ is an integer. Let $\frac{a}{b} - \lfloor\frac{a}{b}\rfloor = x , \frac{c}{d} - \lfloor\frac{c}{d}\rfloor = y$
$\implies x + y = 1$ and $\left(\lfloor\frac{a}{b}\rfloor+x\right)\left(\lfloor\frac{c}{d}\rfloor+y\right)$ is an integer
$\implies \lfloor\frac{a}{b}\rfloor \lfloor\frac{c}{d}\rfloor + \lfloor\frac{a}{b}\rfloor y + \lfloor\frac{c}{d}\rfloor x + xy$ is also an integer
Since the leading term is an integer, the rest must be an integer too. Substituting $y = 1-x$ we get
$\lfloor\frac{a}{b}\rfloor - \lfloor\frac{a}{b}\rfloor x + \lfloor\frac{c}{d}\rfloor x + x - x^2$
Again, the leading term is an integer, so we can remove it. Simplifying the rest, we get...
$x\left(\lfloor\frac{c}{d}\rfloor - \lfloor\frac{a}{b}\rfloor + 1 - x\right)$ is an integer.
I couldn't think of any other suitable transformation and couldn't hit a contradiction. 
I would prefer a solution that elaborates on what I have done above.
 [/INST] Hint: If $\alpha+\beta=k$ and $\alpha=\dfrac{a}{b}$, then $\alpha^2+(k-\alpha)^2-k^2=2\alpha^2-2\alpha k=\dfrac{2a}{b}\left(\dfrac{a}{b}-k\right)$ must be integer.
</s>