Let $G=\{a_1,a_2,\ldots,a_n\}$ be an abelian group and let $m_1\leq m_2\leq \ldots \leq m_n$ be the list of orders of all the elements of $G$.
E.g., for the Klein 4-group $V$ we get the list $1,2,2,2,$ and for the cyclic group $C_4$ we get the list $1,2,4,4$.
Does the list of orders determine $G$? If not, is it true for $p$-groups?
Thanks!