Prime number as factor of square of other number

39 Views Asked by At

Lets $p$ be a prime number, and $x$ any natural number.
If $p$ is factor of $x^2$, then $p$ is factor of $x$? I need this in one exercise, and i also want to somehow prove if it's true.
I tried to list all of numbers i get from prime factorization of $x$ and then try to show that this postulat is true, but i'm not sure if its ok to do this this way.