Problem A5 from putname's competition 2009 asks to prove that there is no finite abelian group such that the product of order of its elements is equal to $2^{2009}$. Starting from this problem, for any group $G$ let $P(G)$ be the product of order of elements of $G$, i.e., $\prod_{x\in G}\mbox{O}(x)$. And consider the sets $$ A := \{ P(G) \; | \; G \mbox{ is a finite group } \} \mbox{ and } B := \{ P(G) \; | \; G \mbox{ is a finite abelian group } \}$$ (e.g., $2^{2009} \not \in B$ and clearly $3,5,7... \not \in A$ )
I have tried to describe $A,B$ in terms of their elements but it gets nowhere. So my goal is to find necessary or sufficient conditions for a nutural number to be an element of $A$ (or $B$). Even calculating $P(S_n)$ would be something! So any suggestion or ideal would be helpful.