2. Given a regular 18-gon $M$. Find the number of quadruples of vertices of this 18-gon that are the vertices of convex quadrilaterals, which have at least one pair of parallel sides.
Answer: 540.

Solution. Let's inscribe the given polygon $K_{1} K_{2} \ldots K_{18}$ in a circle. Each quadrilateral with a pair of parallel sides is determined by a pair of parallel chords with endpoints at points $K_{1}, \ldots, K_{18}$.

Consider a chord connecting two adjacent vertices of the polygon, for example, $K_{6} K_{7}$. There are 8 more chords parallel to it ( $K_{5} K_{8}$, etc.), i.e., we get a set of 9 chords parallel to each other. From these, we can form $C_{9}^{2}=36$ pairs of parallel segments.

We will get similar sets if we consider all chords parallel to $K_{1} K_{2}, \ldots, K_{9} K_{10}$ - a total of 9 such sets.

Now, let's take a chord connecting vertices that are one apart from each other, for example, $K_{6} K_{8}$. There are 7 more chords parallel to it ( $K_{5} K_{9}$, etc.), i.e., we get a set of 8 chords parallel to each other. From these, we can form $C_{8}^{2}=28$ pairs of parallel segments. There are also 9 such sets.

In the end, we get $9 \cdot 36 + 9 \cdot 28 = 576$ quadrilaterals. With this method of counting, rectangles were counted twice. Note that both diagonals of an inscribed rectangle in a circle are diameters, and there are 8 diameters with vertices at the given points, thus we get $C_{9}^{2}=36$ rectangles. Therefore, we have $576 - 36 = 540$ quadrilaterals with at least one pair of parallel sides.