Roman has been attending a math club for quite some time, so he has already learned not only the rules for performing basic operations, but also about a rather complex concept called symmetry. To study symmetry in more depth, Roman decided to start with the simplest geometric figures—triangles. He quickly realized that so-called isosceles triangles possess axial symmetry. Recall that a triangle is called isosceles if its area is positive and it has at least two equal sides.
Recently, when Roman entered the classroom, he saw that points were drawn on the board. Naturally, he immediately wondered how many triples of these points exist that can serve as the vertices of an isosceles triangle.
Write a program to solve this problem.
The first line contains an integer (3 \leq n \leq 1500). Each of the following lines contains two integers x_i and y_i specifying the coordinates of the -th point. The absolute value of all point coordinates does not exceed 10^9. No two of the given points coincide.
Print the answer to the above problem.
Example 1