152. Find all four-digit numbers that are perfect squares and can be written

a). with four even digits;

b) with four odd digits.
152. a) A four-digit number, written with four even digits, can start with the digits 2, 4, 6, or 8; in other words, it is between 1999 and 3000, or between 3999 and 5000, or between 5999 and 7000, or between 7999 and 9000. Therefore, the square root of this number lies between 44 and 55, or between 63 and 71, or between 77 and 84, or between 89 and 95. Note also that since \((10 x + y)^2 = 100 x^2 + 20 x y + y^2\), for \(0 \leqslant y \leqslant 9\) the tens digit of the number \((10 x + y)^2\) is even or odd simultaneously with the tens digit of the number \(y^2\). Therefore, the square root of the desired number cannot end in the digits 4 and 6.

Since the square root of the desired number is even, it can only be one of the following 10 numbers:

$$
48, 50, 52, 68, 70, 78, 80, 82, 90 \text{ and } 92.
$$

Direct verification shows that the numbers satisfying the condition of the problem are:

$$
68^2 = 4624; 78^2 = 6084; 80^2 = 6400; 92^2 = 8464
$$

b) Reasoning similar to that which led us to the solution of part a) shows that there are no four-digit numbers that are perfect squares and are written with four odd digits.