An isosceles triangle is the one in which exactly two of its sides have the same length. A point in the plane is given by two coordinates, (x, y). The following graph shows the idea. Figure 1: Six points, enough to form a few triangles Your task is to create an algorithm that answers, given N points, how many isosceles triangles do they form? Input The input consists of several test cases. For each test case, the first line has an integer N, the number of points. The next N lines contain two integers, Xi and Yi, indicating the points in the plane. 1 ≤ N ≤ 100; −100 ≤ Xi,Yi ≤ 100 Output For each test case, print a single line with an integer, representing the total number of isosceles triangles formed by the N points. To avoid rounding errors, make sure that in your program two lengths La,Lb are considered equal if |La − Lb| < 10−6. Sample Input 6 -4 1 -3 3 -2 1 -2 0 -1 1
2/2 -1 -1 3 -4 1 -2 1 -1 1 Sample Output 4 0