Ring Direct Product of Modulo Integers is Isomorphic to Ring Modulo Product iff Coprime

Theorem
Let $m, n \in \Z_{>1}$.

Let $\left({\Z_m, +_m, \times_m}\right)$ and $\left({\Z_n, +_n, \times_n}\right)$ be the rings of integers modulo $m$ and $n$ respectively.

Let $\left({\Z_m \times \Z_n}\right)$ be the direct product of $\Z_m$ and $\Z_n$.

Let $\left({\Z_{mn}, +_{mn}, \times_{mn}}\right)$ be the ring of integers modulo $mn$.

Then $\left({\Z_m \times \Z_n}\right)$ is isomorphic to $\left({\Z_{mn}, +_{mn}, \times_{mn}}\right)$ iff $m$ and $n$ are coprime.