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.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;


public class CE11D {

	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
	public static void main(String[] args) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = nextInt();
		int[] x = new int [n];
		int[] y = new int [n];
		for (int i = 0; i < n; ++i) {
			x[i] = nextInt();
			y[i] = nextInt();
		}
		HashMap<Point, Integer> hm = new HashMap<Point, Integer>();
		int ans = 0;
		for (int i = 0; i < n - 1; ++i)
			for (int j = i + 1; j < n; ++j) {
				Point p = new Point(x[i] - x[j], y[i] - y[j]);
				if (hm.containsKey(p)) {
					ans += hm.get(p);
					hm.put(p, hm.get(p) + 1);
				} else {
					p = new Point(-p.x, -p.y);
					if (hm.containsKey(p)) {
						ans += hm.get(p);
						hm.put(p, hm.get(p) + 1);
					} else
						hm.put(p, 1);
				}
			}
		pw.println(ans / 2);		
		pw.close();
	}
	static int gcd(int a, int b) {
		return (a == 0) ? b : gcd(b % a, a);
	}
	private static int sumf(int[] fen, int id) {
		int summ = 0;
		for (; id >= 0; id = (id & (id + 1)) - 1) 
 			summ += fen[id];
		return summ;
	}

	private static void addf(int[] fen, int id) {
		for (; id < fen.length; id |= id + 1) 
			fen[id]++;
	}

	private static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	private static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
	private static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
	private static String next() throws IOException {
		while (st==null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}
}
class Point {
	int x, y;
	public Point(int x, int y) {
		this.x = x;
		this.y = y;
	}
	@Override
	public int hashCode() {
		return x * 1000000000 + y;
	}
	@Override
	public boolean equals(Object a) {
		if (a == null)
			return false;
		Point p = (Point) a;
		return (x == p.x && y == p.y)/* || (x == -p.x && y == -p.y)*/;
	}
}
