6. On graph paper (the side of a cell is 1 cm) a rectangle is drawn, the sides of which lie on the grid lines, with one side being 5 cm shorter than the other. It turned out that it can be cut into several pieces along the grid lines and form a square from them. What can the side of this square be? Find all possible values.

#
# Answer: 6 cm.

Solution. Let the larger side of the rectangle be $k$ cm, $k>5$, and the side of the obtained square be $n$ cm. Then, from the equality of areas, we get $k(k-5)=n^{2}$. Note that $k^{2}-5k=k^{2}-6k+9=(k-3)^{2}$ for $k>9$. Therefore, $6 \leqslant k \leqslant 9$. For $k=6,7,8,9$, we get that $k(k-5)$ equals $6 \cdot 1=6, 7 \cdot 2=14, 8 \cdot 3=24, 9 \cdot 4=36$ respectively. Among these values, only the last one is a square of a natural number, and $n=6$. The rectangle $9 \times 4$ can be cut along the grid lines and assembled into a square $6 \times 6$ in many ways.