## The invariant factors of a direct sum Zm+Zn.

Could someone help me???
Q: Show that the invariant factors of the direct sum Zm+Zn are gcd(m,n) and lcm(m,n) if (m,n)>1 and mn if (m,n)=1.