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 {
	BufferedReader in;
	PrintWriter out;
	StringTokenizer str;

	private String next() throws Exception {
		if (str == null || !str.hasMoreElements())
			str = new StringTokenizer(in.readLine());
		return str.nextToken();
	}

	private int nextInt() throws Exception {
		return Integer.parseInt(next());
	}
	
	public void run() throws Exception {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		int n = nextInt();
		P []p = new P[n];
		for(int i = 0; i < n; ++i) {
			p[i] = new P(nextInt(), nextInt());
		}
		long []map = new long[n * (n - 1) / 2];
		int at = 0;
		for(int i = 0; i < n; ++i) {
			for(int j = i + 1; j < n; ++j) {
				int a = p[i].x - p[j].x;
				int b = p[i].y - p[j].y;

				if (a < 0) {
					a = -a;
					b = -b;
				}
				if (a == 0 && b < 0) {
					b = -b;
				}

				long key = (((long)a) << 32) | (b & 0xffffffffL);
				map[at++] = key;
			}
		}

		Arrays.sort(map);
		long ret = 0;
		for(int i = 0; i < map.length; ++i) {
			int j = i;
			while(j < map.length && map[i] == map[j]) {
				++j;
			}
			ret += (j - i) * (j - i - 1) / 2;
			i = j - 1;
		}

		out.println(ret / 2);
		out.close();
	}

	class P {
		int x, y;
		public P(int x, int y) {
			this.x = x;
			this.y = y;
		}
	}

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