Let $m, n$ be coprime positive integers. Let $G$ be an abelian group of order $mn$. Let
$$ H = \{ g^m : g \in G \} \quad K = \{ g^n : g \in G \} \\ $$
Show that $G = HK \cong H \times K$
So far I've shown that that $HK \cong H \times K$ but I'm stuck figuring out how to show that $G = HK$. I know that $HK \subseteq G $ but I'm unsure how to prove the other direction. Any help would be appreciated.
Note: This is part of a bigger question. In the previous parts I've shown that $H, K$ are subgroups of $G$, that any element of $H$ has order dividing $n$, any element of $K$ has order dividing $m$, and $H \cap K = \{ id \}$. I thought I'd include them just in case they are useful.