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.awt.Point;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;

public class D {

	static double EPS = 1e-15;

	static class Line {
		double angle, length;

		public Line(int x1, int y1, int x2, int y2) {
			super();
			if (x2 < x1 || (x1 == x2 && y2 < y1)) {
				int aux = x1;
				x1 = x2;
				x2 = aux;
				aux = y1;
				y1 = y2;
				y2 = aux;
			}
			x2 -= x1;
			y2 -= y1;
			x1 = y1 = 0;
			if (x2 == x1)
				angle = Math.PI / 2;
			else
				angle = Math.atan2((y2 - y1),(x2 - x1));
			length = Math.hypot(y2 - y1, x2 - x1);
		}

		public Line(Point p1, Point p2) {
			this(p1.x, p1.y, p2.x, p2.y);
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			long temp;
			temp = Double.doubleToLongBits(angle);
			result = prime * result + (int) (temp ^ (temp >>> 32));
			temp = Double.doubleToLongBits(length);
			result = prime * result + (int) (temp ^ (temp >>> 32));
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Line other = (Line) obj;
			if (Double.doubleToLongBits(angle) != Double.doubleToLongBits(other.angle))
				return false;
			if (Double.doubleToLongBits(length) != Double.doubleToLongBits(other.length))
				return false;
			return true;
		}

		@Override
		public String toString() {
			return "Line [angle=" + angle + ", length=" + length + "]";
		}

	}

	public static void main(String[] args) throws IOException {
		File inputFile = new File("entradaD");
		if (inputFile.exists())
			System.setIn(new FileInputStream(inputFile));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		String line;
		while ((line = in.readLine()) != null) {
			int n = Integer.parseInt(line);
			HashMap<Line, Integer> map = new HashMap<>();
			Point[] points = new Point[n];
			for (int i = 0; i < n; i++) {
				int[] xy = readInts(in.readLine());
				points[i] = new Point(xy[0], xy[1]);
			}
			long ans = 0;
			Line l;
			for (int i = 0; i < n; i++) {
				for (int j = i + 1; j < n; j++) {
					l = new Line(points[i], points[j]);
					if (!map.containsKey(l))
						map.put(l, 1);
					else {
						int count = map.get(l);
						ans += count;
						map.put(l, count + 1);
					}
				}
			}
			out.append(ans / 2 + "\n");
		}
		System.out.print(out);
	}

	public static int[] readInts(String line) {
		String[] w = line.trim().split("\\s+");
		int[] a = new int[w.length];
		for (int i = 0; i < a.length; i++)
			a[i] = Integer.parseInt(w[i]);
		return a;
	}

	public static long[] readLongs(String line) {
		String[] w = line.trim().split("\\s+");
		long[] a = new long[w.length];
		for (int i = 0; i < a.length; i++)
			a[i] = Long.parseLong(w[i]);
		return a;
	}
}
