James loves rectangles, so he wants to exterminate everyone that dislikes rectangles. In order to convince James that you like rectangles, you are to answer the following question.
Given ~N~ points on a 2-D coordinate plane, count the number of rectangles that can be formed by using four points as vertices.
The first line of input contains integer ~N~.
The following ~N~ lines of input each contain ~x_i, y_i,~ representing points on the coordinate plane.
It's guaranteed that the points are distinct.
Output one integer, the number of rectangles that can be formed with the points given.
NOTE: rectangles may not be axis-aligned.
~1 \le N \le 1\,000~
~-10^6 \le x_i, y_i \le 10^6~
Subtask 1 [20%]
~1 \le N \le 50~
~-10^3 \le x_i, y_i \le 10^3~
Subtask 2 [80%]
No further constraints.
7 1 1 1 2 2 1 2 2 2 3 3 2 3 3