Let $G$ be a non abelian group of order 40 that is the direct product of two of its Sylow subgroups. Show that the center of $G$ has order 10.
I tried 40=5×8 Since $G$ not abelian $G$ NOT EQUAL CENTER OF $G$. Then stuck how to interfere Sylow theorem to find $|Z(G)|=10 $.
Hint: there are only two non-abelian groups of order $8$, the quaternion group or the dihedral. So $G \cong Q \times C_5$ or $\cong D_4 \times C_5$.