A complex number $z$ is an integer if and only if $\sin(\pi z)=0$.
It follows that a complex number $z$ is an integer if and only $\sin^2(\pi z) = 0$. So for a real analytic function $f$ and any real number $x$, $x$ and $f(x)$ are both integers if and only if $\sin^2(\pi x) + \sin^2(\pi f(x)) = 0$.
Are there analytic functions that do the same over the complex numbers? Given a (complex) analytic function $f$, is there a way to assemble an analytic function $F$ so that $z$ and $f(z)$ are both integers if and only if $F(z) = 0$?