#0002CA

O-jednakokraki

You are given N different points in plane. Every point is determined with x and y coordinate.
Find number of isosceles triangles possible to create from given set of points.



InputIn first line of input is integer N (3 <= N <= 1000) represented number of points.
In next N lines are two integers separated by empty space Xi and Yi, represented coordinate of i-th point. (-1 000 000 <= Xi, Yi <= 1 000 000)


OutputIn first line of output write needed numner of isosceles triangles.


In 50% of test cases N will be less then 300.



Input:

5
1 3
3 1
3 3
3 5
5 3

Output:

8


Explanation: Needed eight triangles are those made from points indexed as: (1,2,3), (1,3,4), (2,3,5), (3,4,5) i (1,2,4), (1,2,5), (1,4,5), (2,4,5).

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.