Consider the function $m: \mathbb{N}^2 \to \mathbb{N}$ given by $m((a,b))=ab$. I think the function has an inverse only when $a=b=ab=1$. Am I right? Here's my reasoning.
For the function to have an inverse somewhere, it must be injective there, i.e. only $1$ element in the preimage must target a given element in the image.
i) For any $(a,b)$ s.t. $a \neq 1$ and $b \neq 1$ (i.e. $ab$ composite), we have $m((a,b))=m((1,ab))$, so there are multiple elements in the preimage mapping to $ab$.
ii) For any $(a,b)$ s.t. $a \neq b$, we have $m((a,b))=m((b,a))$, so again there are multiple elements in the preimage mapping to $ab$.
The only $(a,b) \in \mathbb{N}^2$ satisfying both these requirements is $(1,1) \; \square$.
Merry Christmas.