# How to prove $\mathbb{Z}_{2}\times\mathbb{Z}_{16}$ is not isomorphic to$\mathbb{Z}_{4}\times\mathbb{Z}_{8}$?

In an exercise I did,I proved $$\mathbb{Z}_{m}\times\mathbb{Z}_{n}\cong\mathbb{Z}_{lcd(m,n)}\times\mathbb{Z}_{gcd(m,n)}.$$ I also like to show this kind of decomposition is unique,that's to say if $$r|s$$ and $$\mathbb{Z}_{m}\times\mathbb{Z}_{n}\cong\mathbb{Z}_{r}\times\mathbb{Z}_{s}$$ then $$r=gcd(m,n)$$ and $$s=lcd(m,b).$$

For example,how can I prove $$\mathbb{Z}_{2}\times\mathbb{Z}_{16}$$ is not isomorphic to $$\mathbb{Z}_{4}\times\mathbb{Z}_{8}$$?I think a simple case will be a hint.

Any help will be thanked.

Hint: $$\mathbb Z_2\times \mathbb Z_{16}$$ has an element of order $$16$$. Does $$\mathbb Z_4\times\mathbb Z_8$$ also have one?
If $$r\mid s$$ and $$\mathbb{Z}_{m}\times\mathbb{Z}_{n}\cong\mathbb{Z}_{r}\times\mathbb{Z}_{s}$$, then $$r=gcd(m,n)$$ and $$s=lcd(m,b).$$
Suppose $$G=\mathbb{Z}_{m}\times\mathbb{Z}_{n}\cong\mathbb{Z}_{r}\times\mathbb{Z}_{s}$$, with $$r \mid s$$.
Then $$s=\exp(G)=lcm(m,n)$$ and so $$r = \dfrac{|G|}{s} = \dfrac{mn}{lcm(m,n)}=gcd(m,n)$$.