$G$ abelian group with $\vert G\vert =mn$ and $\gcd(m,n)=1$. I hope this is not a duplicate. First of all, in what follows I'm not allowed (unfortunately) to use the structure theorem for abelian groups. I'm asked to prove the following:

Let $G$ be an abelian group with $\vert G\vert =mn$ and $\gcd(m,n)=1$. Prove that $G$ is $H\times K$ with $H,K\leq G$, $\vert H\vert =m$ and $\vert K\vert =n$. 

There's a hint: consider $G^{m}:=\{g^{m}\in G:\ g\in G\}$ and $G^n$ analogously defined.
Well, $G^m$ and $G^n$ are subgroups of $G$ because they are the images under the maps $g\mapsto g^m$ and $g\mapsto g^n$ from $G$ to $G$ and such functions are homomorphisms because $G$ is abelian. By the fact that $$o(g^m)=\dfrac{o(g)}{\gcd (o(g),m)}$$ (where $o(g)$ denotes the order of $g$) and using $\gcd(m,n)=1$, I easily get that $G^m\cap G^n$ is trivial. It is also easy to show that $G^m G^n=G$, writing $1=um+vn$ for some $u,v\in\mathbb{Z}$. Since $G$ is abelian, both subgroups are normal and I get $G^m \times G^n\cong G$. The question is: "How do I show that $\{\vert G^m\vert,\ \vert G^n\vert\}=\{m,n\}$?"
I tried to look at the kernel of, say, $g\mapsto g^m$ which is the set of all elements of $G$ whose order divides $m$ and noticed that $G^{n}\subseteq \ker (g\mapsto g^m)$ but I can't go any further.
Any help would be appreciated. Thanks.
 A: You already showed that $G^mG^n=G$, which implies that $|G^n|\cdot|G^m|\geq G$, and that $G^n$ is contained in the kernel of the morphism $g\to g^m$ whose image is $G^m$, which implies that $|G^n|\cdot|G^m|\leq G$. So in fact $|G^n|\cdot|G^m|=G$. But $|G_n|$ must also be relatively prime with $n$ (or its elements could not be in that kernel), and we must have $|G^n|=m$ and then $|G^m|=n$.
I'll add that what makes this all look a bit tricky is that the statement is not sufficiently general. The more general fact is that for relatively prime integers $m,n$ any Abelian group $G$ annihilated by (taking the power) $mn$ is the direct sum of its subgroups annihilated respectively by $m$ and by $n$. This is immediate from a Bezout relation $1=um+vn$: on one hand any $g=g^{um}g^{vn}$ is in the product of those subgroups, and on the other hand should it be in both at the same time then each of the factors $g^{um}$ and $g^{vn}$ is separately the identity, so $g$ is as well. The order of the subgroup annihilated by $m$ retains all prime factors of $|G|$ that divide $m$ (with there multiplicities) and the rest (those prime factors that divide $n$) goes into the order of the other subgroup.
A: $G^n\subseteq \ker(g\mapsto g^m)$ is already, what you want, as it says that $o(x)|m$ for all $x\in G^n$, hence $(o(x),n)=1$, hence $(|G|,n)=1$.
