5. A square with a side of 12 needs to be completely cut into four squares with an integer side $a$, three squares with an integer side $b$, and ten rectangles with sides $a$ and $b$. Find all values of $a$ and $b$ for which this is possible.
Problem 5.

Answer: $a=2, b=4$.

Solution. A necessary condition for the existence of such a cutting is the equality of areas: $4 a^{2}+3 b^{2}+10 a b=144$. From this, we obtain that $b$ is even and, since $3 b^{2}<144$, the number $b$ can be 2, 4, or 6. For $b=2$, we have: $a(a+5)=33$ and $a$ is not an integer. For $b=4$, we have: $a(a+10)=24 \Rightarrow a=2$. For $b=6$, we have: $a(a+15)=9$ and $a$ is not an integer. Thus, it remains to verify that the cutting with parameters $a=2$, $b=4$ in the considered square is possible.