As I know, in Paillier cryptosystem, the encryption $c$ of a message $m$ is calculated as $c=g^m r^n \bmod n^2$.
Now, I am wondering if I can derive $g^m \bmod n^2$ given that I know $c$, $r$, and $n$?
It seems that the "$\bmod\ n^2$" operation does not constitute a finite field. Not every element has the corresponding multiplicative inverse in $\mathbb Z^*_{n^2}$. So, it seems not always impossible for to find a proper $(r^n)^{-1}$ to get $g^m=g^m r^n (r^n)^{-1} \bmod n^2$
If so, can we find or limit the use of $r$ so that $(r^n)^{-1}$ can always be found?