How to show $\frac{\mathbb{Z}_m\times \mathbb{Z}_n}{\langle (a,b)\rangle}\simeq \mathbb{Z}_{\frac mc}\times \mathbb{Z}_{\frac nd}$? Suppose we have the group $\mathbb{Z}_m\times\mathbb{Z}_n$, and $(a,b)\in\mathbb{Z}_m\times\mathbb{Z}_n$. We need to justify that

(i) There exist $c, d$ such that $\langle (a,b)\rangle$ is isomorphic to the group $\mathbb{Z}_c\times \mathbb{Z}_d$ with $c\mid m, d\mid n$.
(ii) $\dfrac{\mathbb{Z}_m\times \mathbb{Z}_n}{\langle (a,b)\rangle}\simeq \mathbb{Z}_{\frac mc}\times \mathbb{Z}_{\frac nd}$.

How to show these ?
The first one I tried as: Since $\langle (a,b)\rangle$ is cyclic there is $\alpha$ such that $\langle (a,b)\rangle\simeq \mathbb{Z}_\alpha$. And then $\alpha\mid mn$ which means we can find two relatively prime $c,d$ such that $cd=\alpha, c\mid m, d\mid n$ and $\mathbb{Z}_\alpha\simeq \mathbb{Z}_c\times \mathbb{Z}_d$. Then ?
 A: (i) In fact, $\alpha$ is the order of $(a,b)$ in $\mathbb Z_m\times\mathbb Z_n$, so $\alpha=\operatorname{lcm}(m',n')$, where $m'=\operatorname{ord}(a)\mid m$ and $n'=\operatorname{ord}(b)\mid n$. Set $d'=\gcd(m',n')$ and write $m'=d'm_1'$, $n'=d'n_1'$ with $\gcd(m_1',n_1')=1$. Then $\alpha=d'm_1'n_1'$.
Now your goal is to write $\alpha=\alpha_1\alpha_2$ with $\gcd(\alpha_1,\alpha_2)=1$ and $\alpha_1\mid m'$, $\alpha_2\mid n'$. This can be done as follows. If $\gcd(d'm_1',n_1')=1$ or $\gcd(m_1',d'n_1')=1$ then set $\alpha_1=d'm_1'$ and $\alpha_2=n_1'$, or $\alpha_1=m_1'$ and $\alpha_2=d'n_1'$, respectively. Otherwise, there are some primes in common between $d'$ and $n_1'$, respectively between $d'$ and $m_1'$ (but there are no primes in common between these two sets of primes since $\gcd(m_1',n_1')=1$). Now write $d'=ed_1'd_2'$ where $d_1'$ is the product of all common primes between $d'$ and $m_1'$, $d_2'$ is the product of all common primes between $d'$ and $n_1'$, and $e$ is the product of primes in $d'$ which don't show up neither in $m_1'$ nor in $n_1'$. Then $\alpha=(ed_1'm_1')(d_2'n_1')$ and notice that $\gcd(ed_1'm_1',d_2'n_1')=1$.
(ii) By using the SNF for the matrix whose rows are $(a,b)$, $(m,0)$, and $(0,n)$ one find $$\frac{\mathbb{Z}_m\times \mathbb{Z}_n}{\langle (a,b)\rangle}\simeq \mathbb{Z}_{d_1}\times \mathbb{Z}_{d_2},$$
where $d_1=\gcd(a,b,m,n)$ and $d_2=\gcd(bm,an,mn)/d_1$. We have $d_1\mid m$, but I can't see why $d_2\mid n$.
