Let $\langle \Bbb Z_{n \cdot m};+,0 \rangle$ be the additive group of integers modulo $m \cdot n$ and $\Bbb Z_{m} \times \Bbb Z_{n}$ the direct product of the two additive group of integers modulo $m$ and $n$ respectively.
Now I know that the following holds because of the CRT: $$ gcd(m, n) = 1 \implies \Bbb Z_{n \cdot m} \cong \Bbb Z_{m} \times \Bbb Z_{n} $$
What I want to know now if the other direction can also be proven (or disproven): $$ gcd(m, n) = 1 \impliedby \Bbb Z_{n \cdot m} \cong \Bbb Z_{m} \times \Bbb Z_{n} $$
So that if you have the direct product of two groups $\Bbb Z_{m}$ and $\Bbb Z_{n}$, it is only isomorphic to $\Bbb Z_{n \cdot m}$ if $n$ and $m$ are relatively prime.
I am looking for a proof for the second implication or a counter example if the second implication does not hold.
If this is provable, does the more general form
$$ \forall 1 \le i \le n , 1 \le j \le n: i \neq j \to gcd(m_{i},m_{j}) = 1 $$ $$ \iff $$ $$ \Bbb Z_{m_{1}} \times Z_{m_{2}} \times \dotsb \times Z_{m_{n}} \cong \Bbb Z_{m_{1} \cdot m_{2} \dotsb m_{n}} $$
also hold?
I strongly suspect that the implication holds in both directions but I have not found a proof for or a counter example against it.