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.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

/**
 * D. Number of Parallelograms
 * 
 */
public class D2D {

	public static void main(String args[] ) throws IOException {
		try (MyScanner in = new MyScanner();
				PrintWriter out = new PrintWriter(System.out);) {
			int n = in.nextInt();
			int[][] p = new int[n][];
			for (int i = 0; i < n; i++) {
				p[i] = new int[]{in.nextInt(), in.nextInt()};
			}

			// x asc, y asc
			long ans = 0;
			Comparator<int[]> comp = (xy1, xy2) -> xy1[0] != xy2[0] ? Integer.compare(xy1[0], xy2[0]) : Integer.compare(xy1[1], xy2[1]);
			Arrays.sort(p, comp);
			int[][] vectors = new int[n * (n - 1) / 2][];
			int nvec = 0;
			for (int i = 0; i < n; i++)
				for (int j = i + 1; j < n; j++)
					vectors[nvec++] = new int[] {p[j][0] - p[i][0], p[j][1] - p[i][1]};
			Arrays.sort(vectors, comp);
			int v = 1;
			for (int i = 1; i <= vectors.length; i++) {
				if (i == vectors.length ||
						(vectors[i - 1][0] != vectors[i][0] || vectors[i - 1][1] != vectors[i][1])) {
					ans += v * (v - 1) / 2;
					v = 1;
				} else {
					v += 1;
					continue;
				}
			}
			ans /= 2;
			out.println(ans);
		}
	}

	/** see http://codeforces.com/blog/entry/7018 */
	static class MyScanner implements AutoCloseable {
		BufferedReader br; StringTokenizer st;
		MyScanner() {br = new BufferedReader(new InputStreamReader(System.in));}
		String next() {
			while (st == null || !st.hasMoreElements())
				try {st = new StringTokenizer(br.readLine());} catch (IOException e) {throw new IllegalStateException(e);}
			return st.nextToken();
		}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong() {return Long.parseLong(next());}
		double nextDouble() {return Double.parseDouble(next());}
		String nextLine() {try {return br.readLine();} catch (IOException e) {throw new IllegalStateException(e);}}
		@Override
		public void close() {try {br.close();} catch (IOException e) {throw new IllegalStateException(e);}}
	}

}
