2. On graph paper, a polygon with a perimeter of 36 is drawn, with its sides running along the grid lines. What is the maximum area it can have?
Solution. Consider the extreme verticals and horizontals. Moving from them inward does not allow reducing the perimeter, but it decreases the area. Therefore, the rectangle has the largest area. If A and B are the lengths of its sides, then A + B = 18.

By trying different rectangles with a perimeter of 36, such as (1,17), (2,16), etc., we find that the maximum value of the area AB is achieved when A = B = 9, and this area is 81.

## Criteria.

A complete solution consists of two parts: (1) proving that rectangles are better than other shapes and (2) proving that the best rectangle is a square.

If (1) is stated but not proven, the problem is not solved (max. 2 points). If (2) is stated but not proven, the problem is solved with a deficiency (5 points). As proof, it is sufficient to mention what needs to be tried.

Only the answer (or the answer with the indication that it is obtained for a square) — 1 point.