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.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main1 {

	static final double INF = 1e9, EPS = 1e-9;

	static class Point implements Comparable<Point> {

		double x, y;

		Point(double a, double b) {
			x = a;
			y = b;
		}

		public int compareTo(Point p) {
			if (Math.abs(x - p.x) > EPS)
				return x > p.x ? 1 : -1;
			if (Math.abs(y - p.y) > EPS)
				return y > p.y ? 1 : -1;
			return 0;
		}

	}

	static class Line {
		double a, b, c;
		double mx, my;

		Line(Point p, Point q) {

			if (Math.abs(p.x - q.x) < EPS) {
				a = 1;
				b = 0;
				c = -q.x;
			} else {
				a = -(p.y - q.y) / (p.x - q.x);
				b = 1;
				c = -(a * q.x + q.y);
			}
			mx = (p.x + q.x) / 2;
			my = (p.y + q.y) / 2;

		}

		Line(Point p, double m) {
			b = 1;
			a = m;
			c = (m * p.x + p.y);
		}

		boolean parallel(Line l) {
			return Math.abs(a - l.a) < EPS && Math.abs(b - l.b) < EPS;
		}

		boolean same(Line l) {
			return parallel(l) && Math.abs(c - l.c) < EPS;
		}

		Point intersect(Line l) {
			if (parallel(l))
				return null;
			double x = (b * l.c - c * l.b) / (a * l.b - b * l.a);
			double y;
			if (Math.abs(b) < EPS)
				y = -l.a * x - l.c;
			else
				y = -a * x - c;

			return new Point(x, y);
		}

	}

	static Scanner input = new Scanner(System.in);

	public static void main(String[] args) {

		int n = input.nextInt();

		Point[] v = new Point[n];

		ArrayList<Line> e = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			v[i] = new Point(input.nextDouble(), input.nextDouble());
		}

		ArrayList<Point> c = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				c.add(new Point((v[i].x + v[j].x) / 2, (v[i].y + v[j].y) / 2));
			}
		}
		int sum = 0;

		Collections.sort(c);
		
		int lastIndx = 1;
		for (int i = 0; i < c.size();) {
			int x = 1;
			for (int j = i + 1; j < c.size(); j++) {
				if ( Math.abs(c.get(i).x - c.get(j).x) < EPS && Math.abs(c.get(i).y - c.get(j).y) < EPS) {
					x++;
					lastIndx++;
				}
				else {
					break;
				}
				
			}
			lastIndx++;
			i = lastIndx;

			sum += ((x * (x - 1)) / 2);
		}
		System.out.println(sum);

	}
}