To [i]dissect [/i] a polygon means to divide it into several regions by cutting along finitely many line segments. For example, the diagram below shows a dissection of a hexagon into two triangles and two quadrilaterals:
[img]https://cdn.artofproblemsolving.com/attachments/0/a/378e477bcbcec26fc90412c3eada855ae52b45.png[/img]
An [i]integer-ratio[/i] right triangle is a right triangle whose side lengths are in an integer ratio. For example, a triangle with sides $3,4,5$ is an[i] integer-ratio[/i] right triangle, and so is a triangle with sides $\frac52 \sqrt3 ,6\sqrt3, \frac{13}{2} \sqrt3$. On the other hand, the right triangle with sides$ \sqrt2 ,\sqrt5, \sqrt7$ is not an [i]integer-ratio[/i] right triangle. Determine, with proof, all integers $n$ for which it is possible to completely [i]dissect [/i] a regular $n$-sided polygon into [i]integer-ratio[/i] right triangles.