Example 11 In a regular $n$-sided polygon, there is a magpie perched on each vertex. If startled, all the magpies fly away. After some time, they return to these vertices, with one magpie on each vertex, but not necessarily to their original vertices. Find all positive integers $n$, such that there must exist 3 magpies, for which the triangles formed by their initial and final positions are either all acute, all right, or all obtuse.
(2001 China Mathematical Olympiad Problem)
Prove that the conclusion is obviously true for $n=3,4$.
When $n \geqslant 5$, in a regular pentagon with 5 diagonals, there are exactly 5 obtuse triangles and 5 acute triangles. When 5 magpies $A, B, C, D, E$ land in the states shown in Figure 6-41, the acute triangles and obtuse triangles transform into each other, which does not meet the requirements of the problem, so $n=5$ does not work.

When $n \geqslant 6$, if $n=2 m\left(m \geqslant 3, m \in \mathbf{N}_{+}\right)$, take a pair of opposite vertices $A, B$ of the regular $n$-sided polygon, and examine the landing points of the two magpies (still called $A$ and $B$) that fly from these points. If the landing points of magpies $A, B$ are still a pair of opposite vertices, then any one magpie $C$ can be chosen, and the 3 magpies $A, B, C$ will occupy vertices that form right triangles both before and after flying. If the landing points $A^{\prime}, B^{\prime}$ of magpies $A, B$ are not opposite vertices, let the opposite vertex of $A^{\prime}$ be $C^{\prime}$, and let the magpie that lands on $C^{\prime}$ after returning be the one that flew from point $C$. Thus, the 3 magpies $A, B, C$ will occupy vertices that form right triangles both before and after flying, which proves that all even numbers not less than 4 meet the requirements.

If $n=2 m+1\left(m \geqslant 3, m \in \mathbf{N}_{+}\right)$, because the shape of the triangle remains unchanged when the regular polygon and the magpies on its vertices rotate together, it can be assumed that one magpie $A$ returns to the same point after flying away. Draw a diameter $A A^{\prime}$ of the circumcircle of the regular $n$-sided polygon through $A$. Then there are $m$ magpies on each side of this diameter. It is easy to see that 2 magpies on the same side of the diameter and $A$ together form an obtuse triangle. Since $m \geqslant 3$, at least $\left[\frac{m-1}{2}\right]+1 \geqslant 2$ magpies among the $m$ magpies on the same side of the diameter will still be on the same side after flying and returning. Let 2 of these magpies be $B, C$, then the 3 magpies $A, B, C$ will occupy vertices that form obtuse triangles both before and after flying, which proves that all odd numbers not less than 7 also meet the requirements. Therefore, the positive integers that satisfy the problem's requirements are $n \geqslant 3$ and $n \neq 5$.