If $G$ is isomorphic to the direct product of its subgroups $H$ and $K$, are $H$ and $K$ normal in $G$? Is this proposition true? Or give a counter example? It comes from this question: if $H$ is a direct factor of $K$ and $K$ is a direct factor of $G$, then $H$ is normal in $G$. If the proposition is true then we are done.If not then how to prove it ..?

Take any group $H$ with a non-normal subgroup $K\subseteq H$ and consider $G:=H\times K$.
Now let $H':=H\times\{e\}$ and let $K':=K\times\{e\}$. Both are subgroups of $G$ but $K'$ is not normal. However $K'$ is isomorphic to $K$ and $H'$ is isomorphic to $H$ and thus $G\simeq H'\times K'$.
