First, let's show that no rectangle (in particular, a square) can be cut into two, three, or four rectangles with different sides.

Obviously, if a rectangle is cut into two rectangles, they share a common side. Suppose the rectangle is cut into three rectangles. Then one of them contains two vertices of the original rectangle (since three rectangles must cover all four vertices of the original), and we reduce the problem to the previous case (the remaining part is a rectangle that needs to be divided into two).

Finally, assume that the rectangle is cut into four others. We have two possibilities - either one of the rectangles in the partition contains two vertices of the original (and we reduce the problem to cutting a rectangle into three parts), or each of the rectangles in the partition contains one vertex of the original.

In the latter case, consider the two rectangles containing the top vertices. They must touch (if there were a "gap" between them, it could not be covered by the two rectangles containing the other two vertices of the original). Suppose the height of the right rectangle is greater. Then the lower left rectangle has a common side with the upper left one (see the figure).

![](https://cdn.mathpix.com/cropped/2024_05_06_bca77ef9e87e9e47ba11g-47.jpg?height=363&width=512&top_left_y=2334&top_left_x=773)[^0]

![](https://cdn.mathpix.com/cropped/2024_05_06_bca77ef9e87e9e47ba11g-48.jpg?height=869&width=863&top_left_y=0&top_left_x=606)

## Answer

For $n=5$.
Emelyanov L.A.

A square is cut into $n$ rectangles of size $a_{i} \times b_{i}, i=1, \ldots, n$.

For what smallest $n$ can all the numbers in the set $\left\{a_{1}, b_{1}, \ldots, a_{n}, b_{n}\right\}$ be distinct?