Suppose $A = \langle x\mid x^m = e\rangle$, $B = \langle y\mid y^n = e\rangle$, and $C = \langle z\mid z^d = e\rangle$ (these are cyclic groups of order $m,n,d$, respectively). Also suppose $d$ divides $m$ and $n$.
(a) Show that $\phi : C \rightarrow A \times B $, $ z \mapsto (x^{m/d}, y^{n/d})$ is an injective group homomorphism.
(b) Find the elementary divisors of $D = (A \times B)/\phi(C)$ and confirm that $D$ is cyclic iff $d=\mathrm{gcd}(m,n)$.
I think that this problem is related to the Chinese Remainder Theorem and its proof, but I am not sure how to proceed with this. I would appreciate any help with this. Thank you.