I need help with this statement:
Let $G$ be a group such that $|G:Z(G)|=pq$ with $p<q$ primes. Prove that $q \equiv 1 \pmod p$.
I took a subgroup $H$ of $G/Z(G)$ of order $p$ and I tried to apply the result $$|N_G(H):H| \equiv |G:H|\pmod p$$ but I'm stuck.
Any help is apreciated.