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
points on a 2-D coordinate plane, count the number of rectangles that can be formed by using four points as vertices.
Input Specification
The first line of input contains integer .
The following lines of input each contain
,
, representing points on the coordinate plane.
It's guaranteed that the points are distinct.
Output Specification
Output one integer, the number of rectangles that can be formed with the points given.
NOTE: rectangles may not be axis-aligned.
Constraints
Subtask 1 [20%]
Subtask 2 [80%]
No additional constraints.
Sample Input
7
1 1
1 2
2 1
2 2
2 3
3 2
3 3
Sample Output
3
Comments