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 L 
{
	public static void main(String[] arg) throws IOException
	{
		new L();
	}
	public L() throws IOException
	{
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for(int i = 0; i < n; i++)
		{
			x[i] = in.nextInt();
			y[i] = in.nextInt();
		}
		//TreeMap<Long, Integer> hm = new TreeMap<Long, Integer>();
		HashMap<Pair, Integer> hm = new HashMap<Pair, Integer>();
		long ans = 0;
		for(int i = 0; i < n; i++)
		{
			for(int j = i+1; j < n; j++)
			{
				long midx = (x[i]+x[j]);
				long midy = (y[i]+y[j]);
				long key = (midx<<32l)|midy;
				Pair p = new Pair(key);
				//if(!hm.containsKey(key)) hm.put(key, 1);
				if(!hm.containsKey(p)) hm.put(p, 1);
				else
				{
					int v = hm.get(p);
					ans += v;
					hm.put(p, v+1);
//					int v = hm.get(key);
//					ans += v;
//					hm.put(key, v+1);
				}
			}
		}
		out.println(ans);
		in.close(); out.close();
	}
	long MOD = 1_000_000_007;
	class Pair
	{
		long v;
		public Pair(long a)
		{
			v = a;
		}
		@Override
		public boolean equals(Object o)
		{
			if(!(o instanceof Pair)) return false;
			Pair p = (Pair)o;
			return v == p.v;
		}
		@Override
		public int hashCode()
		{
			return (int)(v%MOD);
		}
	}
	class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;
		public FastScanner(InputStream in)
		{
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}
		String next() throws IOException
		{
			while(!st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		int nextInt() throws IOException
		{
			return Integer.parseInt(next());
		}
		void close() throws IOException
		{
			br.close();
		}
	}
}