I should admit the question below does not have a serious motivation. But still I found it somehow natural.
Let $G$ be a finite group of order $n$ with $h$ conjugacy classes. If $c_1,\ldots,c_h$ are the orders of the conjugacy classes of $G$, then clearly
$n=c_1+c_2+\ldots+c_h$.
Let now $\pi_1,\ldots,\pi_h$ be the pairwise non-isomorphic, irreducible complex representations of $G$. It is well known that another partition of $n$ of length $h$ is given by the squares of the degrees $d_i$'s of the $\pi_i$'s:
$n=d_1^2+d_2^2+\ldots+d_h^2$.
Question: Assume that, up to reordering, the two partitions of $n$ described above are the same. Then what can we say about $G$? Is $G$ forced to be abelian?

