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

import java.io.*;
import java.util.*;


public class parallelograms {
	
	static class Point{
		int x;
		int y;
		
	Point(int x, int y) {
		this.x=x;
		this.y=y;
	}
}	
public	static void main(String[] args) throws Exception, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());// Convert String to int 
		
		if(n<4) {
			System.out.println(0);
			return;
		}
	
		Point[] p = new Point[n];
		for(int i=0;i<n;i++) {
				StringTokenizer st = new StringTokenizer(br.readLine(), " "); 
				int x = Integer.parseInt(st.nextToken());
				int y = Integer.parseInt(st.nextToken());
				p[i] = new Point(x,y);
		}
		
		int m=n*(n-1)/2;
		int k=0;
		Point[] p1 = new Point[m];
		for(int i=0; i<n; i++) 
			for(int j=i+1; j<n; j++) {
				int midx = p[i].x +p[j].x;
				int midy = p[i].y +p[j].y;
				p1[k++] = new Point(midx,midy);			
			}		

		Arrays.sort(p1, (u,v) -> u.x!=v.x? u.x-v.x:u.y-v.y);	
		k = 1;
		long num=0;
		for(int i = 1;i <= m;i++)
			if(i<m&& p1[i].x==p1[i-1].x&&p1[i].y==p1[i-1].y) {
				k++;
			}
			else {
				num+=(long)k*(k-1)/2;
				k=1;
				
			}
		System.out.println(num);			
		
		
	}
}
	


