I know that $\mathbb{Z}/n\mathbb{Z} \times \mathbb{Z}/m \mathbb{Z}$ and $\mathbb{Z}/nm \mathbb{Z}$ are isomorphic as rings, if and only if, they are isomorphic as groups, which happens exactly when $\gcd(n, m) = 1$.
I am know wondering : are $\mathbb{Z}/ n\mathbb{Z} \times \mathbb{Z}/ m \mathbb{Z}$ and $\mathbb{Z} / n' \mathbb{Z} \times \mathbb{Z} / m' \mathbb{Z}$ isomorphic as groups iff they are isomorphic as rings ?