Let $G$ and $H$ be finite abelian groups. Show that if for any natural number $n$ the groups $G$ and $H$ have the same number of elements of order $n$, then $G$ and $H$ are isomorphic.
I know, that for an infinity group doesn't work : $ \Bbb Z_{27}$
It seems to me that I can use finitely-generated abelian group
It is possible that this simple fact, but I would ask to write a proof .