TITLE: There are at most two prime numbers dividing $|G|$
QUESTION [23 upvotes]: Need just hints

Let $G$ is a finite non-abelian group such that all its proper subgroups are abelian. Then there are  at most two different prime numbers dividing $|G|$.

I found some ideas about such this group here, https://mathoverflow.net/questions/25307/groups-with-all-subgroups-normal, but honestly don’t know much about Dedekind groups. Thanks.

REPLY [4 votes]: @Babak, you should also study a classic paper (1903) of Miller and Moreno. George Miller was a very prolific group theorist, however he did not dispose of our modern notation. So do not be scared off by the style.