$G=H\times K$ where $H$ and $K$ are non-isomorphic groups of order $n$.
I am looking for an example such that $G$ has no subgroup of order $n$ except $H\times 1$ and $1\times K$.
If anyone can find such a group, I would be thankful.
Edit: Let $G$ be such an example, then $H\times 1$ and $1\times K$ must be characteristic group in $G$ which means $\operatorname{Aut}(G)\cong \operatorname{Aut}(H)\times \operatorname{Aut}(K)$ and clearly $(|H|,|K|)\neq 1$. This may make question easy.(to reach contradiction)
This question is answered in this MathOverflow thread.
There is an example in a 2002 paper of Guralnick (Groups with exactly two subgroups of a given order, Communications in Algebra, Vol. 30, No. 9, pp. 4401-4406), but it seems as though it was an open problem until then.