2. On a piece of paper, 25 points are marked - the centers of the cells of a $5 \times 5$ square. The points are colored with several colors. It is known that no three points of the same color lie on any straight line (vertical, horizontal, or at any angle). What is the minimum number of colors that could have been used? (20 points)
Solution: If no more than two colors are used, then, in particular, in the first row there will be at least three points of the same color - they lie on the same straight line. An example of using three colors (identical numbers denote points painted in the same color):

## Answer: 3 colors

| 1 | 2 | 2 | 3 | 3 |
| :--- | :--- | :--- | :--- | :--- |
| 2 | 3 | 1 | 3 | 2 |
| 3 | 3 | 2 | 1 | 2 |
| 1 | 1 | 3 | 2 | 3 |
| 2 | 2 | 3 | 1 | 1 |