2023 IOQM/Problem 25

Problem 25 Find the least positive integer n such that there are at least 1000 unordered pairs of diagonals in a regular polygon with n vertices that intersect at a right angle in the interior of the polygon.