Question:If $\displaystyle f: G \rightarrow H$ is a homomorphism and $\displaystyle gcd(\mid G \mid, \mid H \mid ) = 1$, prove that $\displaystyle f(x) = 1$, $\displaystyle \forall x \in G$.

I am able to write down some simple results but is unable to piece them together. I have the following:

1) Since ker(f) is a subgroup of G and im(f) is a subgroup of H, $\displaystyle gcd(\mid ker(f) \mid, \mid im(f) \mid ) = 1$. This is acheived after some manipulation.

2) Since f is a homomorphism, order of f(x) divides the order of x

3) I tried to work towards showing that kef(f) = G as this will result in $\displaystyle f(x) = 1$, $\displaystyle \forall x \in G$. But could not get anywhere close to it.

4) Alternatively, i tried to show that im(f) = {1}. Similarly, I could not get anything.

So is there anything that i missed out? Thank You.