660_D. Number of Parallelograms
You are given n points on a plane. All the points are distinct and no three of them lie on the same line. Find the number of parallelograms with the vertices at the given points.

Input

The first line of the input contains integer n (1 ≤ n ≤ 2000) — the number of points.

Each of the next n lines contains two integers (xi, yi) (0 ≤ xi, yi ≤ 109) — the coordinates of the i-th point.

Output

Print the only integer c — the number of parallelograms with the vertices at the given points.

Example

Input

4
0 1
1 0
1 1
2 0


Output

1
```python
n=int(input())
def inp(n):
    coor=[[int(i) for i in input().split()] for j in range(n)]
    
    return coor

coor=inp(n)


def newlist(a):
    d={}
    s=len(a)
    for i in range(1,s):
        for j in range(i):
            if (a[i][0]+a[j][0],a[i][1]+a[j][1]) in d:
                d[a[i][0]+a[j][0],a[i][1]+a[j][1]]+=1
            else:
                d[a[i][0]+a[j][0],a[i][1]+a[j][1]]=1
    return d
def newd(d):
    sum2=0
    for l in d:
        sum2+=d[l]*(d[l]-1)/2        
    return int(sum2)


    

     
print(newd(newlist(coor)))


            


```