Additive and multiplicative function.
There is a standard trick to this. The sketch of the argument is
- $f$ maps squares to squares
- $f$ maps nonnegative numbers to nonnegative numbers (since they are precisely the squares)
- $f$ is monotone increasing, since $x \leq y$ iff $y-x$ is nonnegative