@anon yeah your right the other direction is easier. $|G| = p_1^{\alpha_1} ...p_n^{\alpha_2}$, since each suppose that $P_i$ is the sylow p subgroup for the ith prime divisor of G. Since each subgroup of abelian group is normal so in particular $P_i$ is normal, so $n_{p_i} = 1$ for each $i \in \{1,...,n\}$. Now consider F = $P_1 x ... x P_n$, $|F| = |P_1||P_2|...|P_n|$, since we have $P_i \cap P_j = 1 \forall i,j \in \{1,...,n\} \ with \ i \neq j$