5. Two players are playing a game. Initially, they have a rectangular sheet of paper of size $m \times n$, where $m$ and $n$ are natural numbers greater than 1. The players take turns. On each turn, a player cuts the existing rectangle into two, one of which has an area of 1, and discards the rectangle of unit area. The player loses if, after their move, the remaining rectangle has a side length strictly less than 1 or if a 1x1 square remains. Who will win with correct play: the one who moves first, or their partner, - and how should they play to win?
Answer. If the area of the original rectangle is odd, the first player wins; if it is even, the second player wins. Solution. Lemma. If the area $S$ of a rectangle is not less than 3, and both of its sides are longer than 1, then by cutting off a unit rectangle parallel to the shorter side, we will obtain a rectangle where both sides are also longer than 1. Proof. For a rectangle whose area is not less than 3, the length of the longest side is greater than 1.5; otherwise, its area would be less than $1.5^2 = 2.25$. If we cut off a rectangle of area 1 parallel to the shorter side, the longer side will decrease by its $1/S$ part, which is no more than one-third of its length. Therefore, its length will remain greater than 1. The length of the side parallel to which the cut was made will not change. The lemma is proved.

Thus, the players can make moves that do not lead to immediate loss (for example, parallel to the shorter side of the remaining rectangle) until the area of the remaining part becomes 2. This will happen after $mn-2$ moves. If this number is even, the turn will be with the first player; if it is odd, with the second player, and the one who makes this move loses. Indeed, after this move, a rectangle of area 1 will remain. If both of its sides are equal to 1, then it is a 1×1 square, and in all other cases, the shorter side is less than 1.