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.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Random;
import java.util.StringTokenizer;

public class Main {

	static int MOD = 1000 * 1000 * 1000 + 7;

	public static void shuffleArray(int[] arr) {
		int n = arr.length;
		Random rnd = new Random();
		for (int i = 0; i < n; ++i) {
			int tmp = arr[i];
			int randomPos = i + rnd.nextInt(n - i);
			arr[i] = arr[randomPos];
			arr[randomPos] = tmp;
		}
	}

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		solve(in, out);
		out.close();
		System.exit(0);
	}

	static class Pair implements Comparable<Pair> {
		double x;
		double y;

		Pair(double x, double y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public int compareTo(Pair o) {
			int comp1 = Double.compare(x, o.x);
			if (comp1 != 0) {
				return comp1;
			}
			return Double.compare(y, o.y);
		}

		@Override
		public boolean equals(Object obj) {
			return ((obj instanceof Pair) && ((Pair) obj).x == x && ((Pair) obj).y == y);
		}

		@Override
		public int hashCode() {
			return 97 * (int) x + (int) y;
		}

	}

	private static void solve(InputReader in, PrintWriter out) {
		int n = in.nextInt();
		int[] xi = new int[n];
		int[] yi = new int[n];
		HashMap<Pair, Integer> ts = new HashMap<>();
		for (int i = 0; i < n; i++) {
			int x = in.nextInt();
			int y = in.nextInt();
			xi[i] = x;
			yi[i] = y;
		}

		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				double xMid = xi[i] + (xi[j] - xi[i]) * 1.0 / 2;
				double yMid = yi[i] + (yi[j] - yi[i]) * 1.0 / 2;
				Pair p = new Pair(xMid, yMid);
				int curr = ts.getOrDefault(p, 0);
				ts.put(p, curr + 1);
			}
		}

		long res = 0;
		for (int v : ts.values()) {
			res += (v * 1l) * (v - 1) / 2;
		}

		out.print(res);
	}

	/*
		* 
		*/
	// --------------------------------------------------------

	private static int gcd(int n, int m) {
		if (m == 0) {
			return n;
		}

		return gcd(m, n % m);
	}

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

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			String str = "";
			try {
				str = reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return str;
		}
	}

}