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.util.*;
import java.io.*;

public class Main {
	public static void main(String args[]) {new Main().run();}

	FastReader in = new FastReader();
	PrintWriter out = new PrintWriter(System.out);
	void run(){
		work();
		out.flush();
	}
	long mod=998244353;
	long gcd(long a,long b) {
		return b==0?a:gcd(b,a%b);
	}
	void work() {
		int n=in.nextInt();
		long[][] A=new long[n][2];
		for(int i=0;i<n;i++) {
			A[i]=new long[] {in.nextLong(),in.nextLong()};
		}
		long[] rec=new long[n*(n-1)/2];
		long ret=0;
		for(int i=0,k=0;i<n;i++) {
			for(int j=0;j<i;j++) {
				long p=(A[i][0]-A[j][0]);
				long q=(A[i][1]-A[j][1]);
				if(p==0||q==0) {
					p=Math.abs(p);
					q=Math.abs(q);
				}
				long v=(Math.abs(q)<<32)+Math.abs(p);
				if(p*q<0)v=-v;
				rec[k++]=v;
			}
		}
		Arrays.sort(rec);
		for(int i=0,j=0;i<rec.length;) {
			while(j<rec.length&&rec[j]==rec[i]) {
				j++;
			}
			ret+=(j-i)*(j-i-1)/2;
			i=j;
		}
		out.println(ret/2);
	}
}	



class FastReader
{
	BufferedReader br;
	StringTokenizer st;

	public FastReader()
	{
		br=new BufferedReader(new InputStreamReader(System.in));
	}

	public String next() 
	{
		if(st==null || !st.hasMoreElements())
		{
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	}

	public int nextInt() 
	{
		return Integer.parseInt(next());
	}

	public long nextLong()
	{
		return Long.parseLong(next());
	}
}