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 right angle in the interior of the polygon.