4. On a sheet of notebook paper, two rectangles are outlined. The first rectangle has a vertical side shorter than the horizontal side, while the second has the opposite. Find the maximum possible area of their common part, if each rectangle contains more than 2010 but less than 2020 cells.
Solution. The common part of these two rectangles (if it is non-empty) is a rectangle. Let's define the maximum possible lengths of its sides.

The vertical side of the first rectangle is shorter than the horizontal one, so it is less than $\sqrt{2020}$, which is less than 45; the same is true for the horizontal side of the second rectangle. At the same time, the sides of the intersection cannot exceed the corresponding sides of the original rectangles (but they can obviously be equal to them).

Let's find the greatest possible length of each of these sides. For this, we need to find the greatest number less than 45 that is a divisor of any number from 2011 to 2019 inclusive. It can be noted that none of the numbers $2011, \ldots, 2019$ are divisible by 44 (since $2024=45^{2}-1^{2}=$ $44 \cdot 46$ is divisible by 44), nor by 43 (since $2021=45^{2}-2^{2}=43 \cdot 48$ is divisible by 43). However, the number 2016 is divisible by 42 (since $2024=45^{2}-3^{2}=42 \cdot 48$), so the maximum possible length of each of the sides of the intersection is 42. Therefore, the maximum area of the intersection is $42^{2}=1764$. This value is achieved for rectangles $48 \times 42$ and $42 \times 48$, aligned, for example, by their top-left cells.

Answer: 1764.