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
// No sorceries shall previal. //         
import java.io.*;
import java.util.*;
     
public class _InVoker_ {
	static long mod = 1000000007;
    public static void sort(long arr[], int start, int end) { 		
		if(start>=end)
			return;		
		int mid=(start+end)/2;
		sort(arr,start,mid);
		sort(arr,mid+1,end);
		merge(arr,start,mid,end);	
	}	
	private static void merge(long arr[], int start, int mid, int end) {		
		int i, j=mid+1,c=0;
		long temp[]= new long[end-start+1];
		for(i=start;i<=mid && j<=end;c++) {
			if(arr[i]<=arr[j]) {
				temp[c]=arr[i];
				i++;
			}
			else {
				temp[c]=arr[j];
				j++;
			}
		}
		while(i<=mid) {
			temp[c]=arr[i];
			i++;c++;
		}
		while(j<=end) {
			temp[c]=arr[j];
			j++;c++;
		}
		c=0;
		for(i=start;i<=end;i++,c++)
			arr[i]=temp[c];
	}
	static long gcd(long a, long b) { 
      if (b == 0) 
        return a; 
      return gcd(b, a % b);  
    }
	
	public static void main(String args[]) {
    		
    	Scanner inp=new Scanner(System.in);
    	PrintWriter out= new PrintWriter(System.out);
    	
    	int n=inp.nextInt();
		long x[]=new long[n];
		long y[]=new long[n];
		for(int i=0;i<n;i++) {
			x[i]=inp.nextLong();
			y[i]=inp.nextLong();
		}
		long a[]=new long[n*n];
		int c=0,l=(n-1)*n/2;
		for(int i=0;i<n;i++) {
			for(int j=i+1;j<n;j++) {
				a[c++]=(x[i]+x[j])*mod +y[i]+y[j];
			}
		}
		sort(a,0,l-1);
		long gg=0;
		for(int i=0;i<l-1;i++) {
			if(a[i]==a[i+1]) {
				c=1;
				while(i<l-1 && a[i]==a[i+1]) {
					i++;
					c++;
				}
				i--;
				gg+=(c*(c-1)/2);
			}
		}
    	out.println(gg);
    	
    	inp.close();
    	out.close();
    }	
}