2. let $m, n$ be natural numbers. Consider a square grid of $(2 m+1) \times$ $(2 n+1)$ points in the plane. A set of rectangles is called good if the following holds:

(a) For each of the rectangles, the four corner points lie on grid points and the sides are parallel to the grid lines.

(b) No two of the rectangles have a common corner point.

Determine the largest possible value of the sum of the areas of all rectangles in a good set.

## Solution
We introduce coordinates so that the grid consists exactly of the points $(x, y)$ with integer coordinates $-m \leq x \leq m$ and $-n \leq y \leq n$. We determine the largest possible number of rectangles in a good set that can cover a fixed unit square. For reasons of symmetry, we can restrict ourselves to the first quadrant. Consider the unit square with upper right vertex $(k+1, l+1), k, l \geq 0$. For each rectangle that covers it, its upper right vertex must lie in the set $\{(x, y) \mid k+1 \leq x \leq m, l+1 \leq y \leq n\}$, and because of (b) these vertices are all different. It follows that the unit square is covered by at most $(m-k)(n-l)$ rectangles.

Thus, the sum of the areas of all rectangles in a good set is at most equal to

$$
\begin{aligned}
4 \sum_{k=1}^{m} \sum_{l=1}^{n} k l & =4\left(\sum_{k=1}^{m} k\right)\left(\sum_{l=1}^{n} l\right) \\
& =4 \cdot \frac{m(m+1)}{2} \cdot \frac{n(n+1)}{2}=m n(m+1)(n+1)
\end{aligned}
$$

This maximum is also assumed: The set of all rectangles with vertices $( \pm k, \pm l), 1 \leq k \leq m, 1 \leq l \leq n$ is good and for them equality applies everywhere in the above estimates.

![](https://cdn.mathpix.com/cropped/2024_04_28_10a4103699099e4e31a9g-02.jpg?height=728&width=1016&top_left_y=1526&top_left_x=543)

Figure 1: Construction for solving task 3