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.*;
public class D660 {
public static void main(String[] args) throws IOException {
	input.init(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = input.nextInt();
	int[] xs = new int[n], ys = new int[n];
	for(int i = 0; i<n; i++)
	{
		xs[i] = input.nextInt();
		ys[i] = input.nextInt();
	}
	HashMap<Long, Integer> map = new HashMap<Long, Integer>();
	long mult = (long)(2e9+7);
	long res = 0;
	for(int i = 0; i<n; i++)
		for(int j = i+1; j<n; j++)
		{
			long key = mult * (xs[i] + xs[j]) + ys[i] + ys[j];
			int c = map.containsKey(key) ? map.get(key) : 0;
			res += c;
			map.put(key,  c+1);
		}
	out.println(res);
	out.close();
}

public static class input {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String next() throws IOException {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
		return tokenizer.nextToken();
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
}
}

