Let $f:\mathbb Z \rightarrow \mathbb Z$ such that $f(x+y)=f(x)+f(y), \forall x,y \in \mathbb Z$ and $f(xy)=f(x)f(y), \forall x,y \in \mathbb Z$. I need to prove that either $f=I_{\mathbb Z}$ is the identity function or $f(x)=0, \forall x \in \mathbb Z$.
Supose $f(x) \neq 0, \forall x \in \mathbb Z$, Then I should be able to show that $f(x)=x$, but I didn't manage to do it. Please, give-me a hint. Thank you!