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.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.StringTokenizer;
import java.util.TreeMap;



public class Abood2B {

	static int gcd(int a, int b) {
		if(a == 0) return b;
		return gcd(b % a, a);
	}

	static class Line implements Comparable<Line> {
		long dx, dy, dist;

		Line(long x, long y, long d) {
			dx = x;
			dy = y;
			dist = d;
		}

		@Override
		public int compareTo(Line o) {
			if(dx != o.dx)
				return (dx > o.dx ? 1 : ((dx < o.dx) ? - 1 : 0));
			if(dy != o.dy)
				return (dy > o.dy ? 1 : ((dy < o.dy) ? - 1 : 0));
			return (dist > o.dist ? 1 : ((dist < o.dist) ? - 1 : 0));
		}
	}


	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] x = new int[n];
		int[] y = new int[n];
		ArrayList<Line> lines = new ArrayList<>();
		int ans = 0;

		for (int i = 0; i < n; i++) {
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
		}

		for (int i = 0; i < n; ++i) {
			for (int j = i + 1; j < n; ++j) {
				int dx = x[i] - x[j];
				int dy = y[i] - y[j];
				long d = 1l * dx * dx + 1l * dy * dy;
				int gcd = gcd(Math.abs(dx), Math.abs(dy));

				if(dx >= 0 && dy >= 0 || dx <= 0 && dy <= 0) {
					dx = Math.abs(dx) / gcd;
					dy = Math.abs(dy) / gcd;
				}else {
					dx = - Math.abs(dx) / gcd;
					dy = Math.abs(dy) / gcd;
				}
				Line l = new Line(dx, dy, d);

				
				lines.add(l);
			}
		}
		
		Collections.sort(lines);
		int c = 1;
		for (int i = 1; i < lines.size(); i++) {
			if(lines.get(i).compareTo(lines.get(i - 1)) == 0)
				c++;
			else {
				ans += c * (c - 1) / 2;
				c = 1;
			}
		}
		ans += c * (c - 1) / 2;
		out.println(ans / 2);

		out.flush();
		out.close();
	}






	static class Scanner 



	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}


		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}



	}

}