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


public class Task_Rnd600_D {

	final static String input_file_name = "input/Rnd600_D.txt";
	
	public static void main(String[] args)
	{
		//!!!!!!!!!!111
		reader.init(true);		//to server
		//reader.init(false);
		
		run();
		wr.flush();
	}

    public static void run()
    {
    	int n = reader.nextInt();
    	
    	int xx[] = new int[n];
    	int yy[] = new int[n];
    	for (int ii = 0; ii < n; ii++)
    	{
    		xx[ii] = reader.nextInt();
    		yy[ii] = reader.nextInt();
		}

		//Map<Long, Integer> map = new HashMap<Long, Integer>();
		long arr[] = new long[n * (n-1) / 2];

		int dx, dy;
		int na = 0;
		for (int ii = 0; ii < n; ii++)
		{
			for (int jj = ii+1; jj < n; jj++)
			{
				dx = xx[ii] - xx[jj];
				dy = yy[ii] - yy[jj];
				if (dx < 0)
				{
					dx = -dx;
					dy = -dy;
				}
				else
				if (dx == 0 && dy < 0)
					dy = -dy;

				long key = (((long)dx) << 32) | (dy & 0xffffffffL);
				arr[na++] = key;
				//if (map.containsKey(key))
				//	map.put(key, map.get(key)+1);
				//else
				//	map.put(key, 1);
			}
		}

		Arrays.sort(arr);

		long cnt = 0;
		for (int ii = 0; ii < na; )
		{
			int jj = ii+1;
			while (jj < na && arr[jj] == arr[ii])
				jj++;

			long val = jj-ii;
			cnt += val * (val-1) / 2;
			ii = jj;
		}
		/*
		for(Entry<Long, Integer> entry : map.entrySet()) {
			long val = (long)entry.getValue();
			if (val > 1)
				cnt += val * (val-1) / 2;
		}
		*/

		wr.print(cnt/2);
		wr2.endl();
    }
	
     
    static public PrintWriter wr; 
    static OutputWriter wr2=new OutputWriter(System.out);
	static class reader{
		static BufferedReader br; static StringTokenizer tkn;
		static String readln() { try { return br.readLine(); } catch (Exception e) { return ""; } }
		static void init(boolean console) {
			if (console) { br=new BufferedReader(new InputStreamReader(System.in)); }
			else { try { br=new BufferedReader(new InputStreamReader(new FileInputStream(input_file_name))); }
				catch (Exception e) { System.exit(551); } }
			tkn=new StringTokenizer("");
		}
		static String next() { while (!tkn.hasMoreTokens()){ tkn=new StringTokenizer(readln()); } return tkn.nextToken(); }
		static int nextInt(){ while (!tkn.hasMoreTokens()){ tkn=new StringTokenizer(readln()); } return Integer.parseInt(tkn.nextToken()); }
		static long nextLong(){ while (!tkn.hasMoreTokens()){ tkn=new StringTokenizer(readln()); } return Long.parseLong(tkn.nextToken()); }
		static double nextDouble(){ while (!tkn.hasMoreTokens()){ tkn=new StringTokenizer(readln()); } return Double.parseDouble(tkn.nextToken()); }
	}
    static class OutputWriter {
        OutputWriter(OutputStream stream) { wr = new PrintWriter(stream); }
        public void printf(String format, Object... args) { wr.print(String.format(Locale.ENGLISH, format, args)); }
        public void endl() { wr.print("\n"); }
    }
}
