The problem is as in title... I understand that, according to for example answers to this question, trivial solution is $f(x)=x$. However, I don't see is weakening condition $f(x\cdot y)=f(x)\cdot f(y)$ to not have to hold for all $x,y\in \mathbb{N}$, but only when $\gcd(x,y)=1$, making it possible to find any alternative solution?
Thanks.