Determine the smallest integer $n$ such that for any configuration of $n$ points with integer coordinates, there exist two of these points whose midpoint also has integer coordinates.

Recall that if we denote $\left(x_{m} ; y_{m}\right)$ as the coordinates of the midpoint between $\left(x_{1} ; y_{1}\right)$ and $\left(x_{2} ; y_{2}\right)$, then we have $x_{m}=\frac{x_{1}+x_{2}}{2}$ and $y_{m}=\frac{y_{1}+y_{2}}{2}$.
We are interested in the midpoint $\left(x_{m} ; y_{m}\right)$ of a segment between $\left(x_{1} ; y_{1}\right)$ and $\left(x_{2} ; y_{2}\right)$. For this midpoint to have integer coordinates, it is necessary that $x_{m}$ AND $y_{m}$ are integers, which means that $x_{1}+x_{2}$ AND $y_{1}+y_{2}$ must be even numbers.

If we look at a point, we have 4 possibilities:

$\triangleright x$ even and $y$ even;

$\Delta x$ even and $y$ odd;

$\Delta x$ odd and $y$ even;

$\Delta x$ odd and $y$ odd.

These possibilities will be our drawers: indeed, if two points are in the same category, $x_{1}$ and $x_{2}$ have the same parity, and also $y_{1}$ and $y_{2}$ have the same parity; therefore, $x_{1}+x_{2}$ AND $y_{1}+y_{2}$ are even numbers.

We want to place two points in the same drawer.

Since we have 4 drawers, we need at least 5 points by the pigeonhole principle.

Thus, $n=5$ allows us to have a midpoint with integer coordinates.

It remains to show that $n<5$ does not work: indeed, for example, for $n=4$, by taking the points $(0 ; 0),(1 ; 0),(0 ; 1)$ and $(1 ; 1)$, we have six midpoints and none of them have integer coordinates.

From this, the smallest integer $n$ satisfying the property is $n=5$.