If p is a prime and G is a finite group in which every element has order a power of p, prove that G is a p-group.

I was think cauchy theorem would help here.... If G is a finite group whose order is divisible by a prime p, the G contains an element of order p.