1071. Let $p$ be a prime number. How many natural numbers exist:

a) less than $p$ and coprime with $p$;

b) less than $p^{2}$ and coprime with $p^{2}$?
$\triangle$ a) The number of natural numbers less than $p$ and coprime with $p$ is $p-1$ - these are all natural numbers less than $p$.

b) First, let's count the number of natural numbers not exceeding $p^{2}$ and not coprime with $p^{2}$. These numbers are

$$
p, 2 p, 3 p, \ldots,(p-1) p, p^{2}
$$

Obviously, there are $p$ such numbers. Then, the number of natural numbers less than $p^{2}$ and coprime with both the number $p$ and the number $p^{2}$ is

$$
p^{2}-p=p(p-1)
$$

Answer: a) $p-1 ;$ b) $p(p-1)$.