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.Arrays;
import java.util.Random;
import java.util.StringTokenizer;


public class D {

	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
	static class Sort implements Comparable<Sort> {
		long A, B, D;
		public int compareTo(Sort arg0) {
			if (this.A==arg0.A) {
				if (this.B==arg0.B) {
					if (this.D > arg0.D)
						return 1;
					if (this.D < arg0.D)
						return -1;
					return 0;
				}
				if (this.B > arg0.B)
					return 1;
				return -1;
			}
			if (this.A > arg0.A)
				return 1;
			return -1;
		}
	}
	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();
		long[]x = new long[n+1], y = new long[n+1];
		for (int i = 1; i <= n; i++) {
			x[i] = nextLong();
			y[i] = nextLong();
		}
		Sort[]a = new Sort[n*n+1];
		int cnt = 0;
		for (int i = 1; i <= n; i++) {
			for (int j = i+1; j <= n; j++) {
				long A = y[i]-y[j];
				long B = x[j]-x[i];
				long g = gcd(Math.abs(A), Math.abs(B));
				A /= g;
				B /= g;
				if (A < 0) {
					A = -A;
					B = -B;
				}
				if (A==0 && B < 0)
				    B = -B;
				long D = (x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]);
				a[++cnt] = new Sort();
				a[cnt].A = A;
				a[cnt].B = B;
				a[cnt].D = D;
			}
		}
		Arrays.sort(a, 1, cnt+1);
		long ans = 0, equal = 1;
		for (int i = 2; i <= cnt+1; i++) {
			if (i==cnt+1 || a[i].A != a[i-1].A || a[i].B != a[i-1].B || a[i].D != a[i-1].D) {
				ans += equal * (equal-1) / 2;
				equal = 1;
			}
			else
				equal++;
		}
		System.out.println(ans / 2);
		pw.close();
	}
	private static long gcd(long a, long b) {
		if (b==0)
			return a;
		return gcd(b, a % b);
	}
	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();
	}
}