# 5. CONDITION

For which $n$ does there exist a convex $n$-gon, one of whose sides has length 1, and the lengths of all diagonals are integers?
Solution. For $n=4$ and $n=5$, it is possible to construct polygons where one side is equal to 1, and the diagonals "bounding" this side are equal to 2. If, however, $n \geq 6$, then if $A B=1$, the diagonals extending from one of the vertices and connecting it to $A$ and $B$ are equal (as integer values, the difference of which is < 1). Therefore, for $n \geq 6$, there will be two different isosceles triangles with base $A B$ and the third vertex at a vertex of the polygon, meaning that one of these vertices lies inside the other triangle, i.e., inside the polygon, which contradicts its convexity.

Answer: $n=4$ and $n=5$.