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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class D {
	public static void main(String[] args) throws IOException {
		FastScanner scan = new FastScanner(System.in);
		int n = scan.nextInt();
		int[] xs = new int[n];
		int[] ys = new int[n];
		TreeMap<Long, Integer> map = new TreeMap<Long, Integer>();
		for (int i = 0; i < n; i++) {
			xs[i] = scan.nextInt();
			ys[i] = scan.nextInt();
		}
		long ans = 0;
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				long hash = hash(xs[i], xs[j], ys[i], ys[j]);
				if (map.containsKey(hash)) {
					int cnt = map.get(hash);
					ans += cnt;
					map.put(hash, cnt + 1);
				} else {
					map.put(hash, 1);
				}
			}
		}
		System.out.println(ans);
	}

	static long hash(int x1, int x2, int y1, int y2) {
		return ((x1+(long)x2) << 32) | (y1 + y2);
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}

		public String next() throws IOException {
			while (!st.hasMoreElements()) {
				st = new StringTokenizer(br.readLine());
			}
			return st.nextToken();
		}

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