4. From cubes with edges of $1 \mathrm{~cm}$, a rectangular parallelepiped with edges $a \mathrm{~cm}, b \mathrm{~cm}, \mathrm{c}$ cm (where $a, b, c$ are natural numbers greater than 1) is constructed. The parallelepiped thus obtained is painted red on the outside. How many cubes, from which the parallelepiped is made, have:

a) only three edges painted red;

b) only two edges painted red;

c) only one edge painted red;

d) no edges painted red.
Solution. a) Only three red-painted edges have the eight cubes, which are located at the vertices of the parallelepiped.

b) Only two red-painted edges have the cubes, which are located on the edges of the parallelepiped, excluding the cubes from the vertices, and their number is

$$
4(a-2)+4(b-2)+4(c-2)
$$

c) Only one red-painted edge has the cubes, whose only one side is on the surface of the parallelepiped. Their number will be obtained if we subtract the number of cubes with two or three red-painted edges from the number of all cubes on the surface of the parallelepiped. That number is

$$
2[(a-2)(b-2)+(b-2)(c-2)+(c-2)(a-2)] .
$$

d) No red-painted edges have the cubes, which are located inside the parallelepiped. They are in the number of $(a-2)(b-2)(c-2)$ (they form a parallelepiped with edges $a-2, b-2, c-2$).