[ Cutting into parts with special properties ]

For what smallest $n$ can a square $n \times n$ be cut into squares $40 \times 40$ and $49 \times 49$ so that squares of both types are present?

#
Note that for $n=2000=40 \cdot 49+40$ the required cutting exists (see the left figure).
![](https://cdn.mathpix.com/cropped/2024_05_06_6b47f7415227382cfc43g-23.jpg?height=298&width=686&top_left_y=294&top_left_x=686)

Assume that there exists a square $n \times n$, where $n>2000$. This leads to a contradiction.

## Answer

$n=2000$.