Suppose $a,b,c,d$ are positive integers such that $b$ is an integer multiple of $a$ and $d$ is an integer multiple of $c$. Prove that if the direct products $$\mathbb{Z}_a\oplus\mathbb{Z}_b \text{ and } \mathbb{Z}_c\oplus\mathbb{Z}_d$$ are isomorphic, then $a=c$ and $b=d$.
My attempt: We can see that because these two products are isomorphic, $a*b=c*d$, so $a^2k=c^2l$ for some integers $k,l$. Hence,
$a = c\sqrt{\frac{l}{k}}$, so since $a$ is an integer, $k$ must divide $l$.
I got this far, but now I'm stuck.
Any help appreciated!