Possible Class equation for a group
Hint: the number of 1's is the order of $Z(G)$, the center of $G$. Also, $|G/Z(G)|$ can not be a prime number. And of course $|Z(G)|$ divides the order of $G$. This leaves you with the first and last possibilities. In the last case the group is abelian.