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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.io.BufferedInputStream;
import java.util.concurrent.Callable;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		BufferedInputStream in = new BufferedInputStream(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskD {
		public void solve(int testNumber, BufferedInputStream _in, PrintWriter out) {

			InputReader in = new InputReader(_in);
			long startTime = System.currentTimeMillis();
			int nt = 1;
			Task t = new Task(1);
			t.readInput(in);
			t.call();
			t.writeOutput(out);
			in.close();
			System.err.println("Time: " + (System.currentTimeMillis() - startTime) + " miliseconds");
		}

	}

	static class Task implements Callable<Task> {
		ArrayList<PointI> points = new ArrayList<>();
		int n;
		long RE = 0;
		int testNumber;

		public void readInput(InputReader in) {
	/* read input here */
			n = in.nextInt();
			for (int i = 0; i < n; ++i) {
				points.add(new PointI(in.nextInt(), in.nextInt()));
			}
		}

		public Task call() {
	/* process main algorithm here */
			Collections.sort(points);
//		HashMap<Point, Integer> hm = new HashMap<>();
			ArrayList<PointI> lp = new ArrayList<>();
			for (int i = 0; i < n; ++i)
				for (int j = 0; j < i; ++j) {
					PointI p = new PointI(points.get(i).x - points.get(j).x, points.get(i).y - points.get(j).y);
					lp.add(p);

				}

			Collections.sort(lp);
			int x = 0;
			while (x < lp.size()) {
				int y = x + 1;
				while (y < lp.size()) {
					if (lp.get(x).equals(lp.get(y))) y++;
					else break;
				}

				long df = y - x;
				x = y;
				RE += df * (df - 1) / 2;
			}

			System.err.println("Test case: " + testNumber + " done!");
			return this;
		}

		public void writeOutput(PrintWriter out) {
			out.println(RE / 2);
		}

		Task(int testNumber) {
			this.testNumber = testNumber;
		}

	}

	static class PointI implements Comparable<PointI> {
		int x;
		int y;

		public PointI(int x, int y) {
			this.x = x;
			this.y = y;
		}


		public int compareTo(PointI o) {
			if (y != o.y) return Integer.compare(y, o.y);
			else return Integer.compare(x, o.x);
		}


		public int hashCode() {
			return Integer.hashCode(x) ^ Integer.hashCode(y);
		}

		public boolean equals(Object obj) {
			if (obj instanceof PointI) {
				return compareTo((PointI) obj) == 0;
			}
			return false;
		}

	}

	static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public static boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public void close() {

		}

	}
}

