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

public class Edu11D {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x[] = new int[n];
		int y[] = new int[n];
		
		for(int i=0; i<n; i++)
		{
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
		}
		
		ArrayList<Line> slopes = new ArrayList<Line>();
		for(int i=0; i<n; i++)
			for(int j = i+1; j<n; j++)
			{		
				
					double slope; 
					if(x[j] == x[i])
					{
						slope = 10000000000000000000000.0;
						
					}
					else
						slope = (long)(y[j] - y[i])*1.0/(x[j] - x[i]);
					
					long length = Math.abs((long)(y[j] - y[i])*(y[j] - y[i]) + (long)(x[j] - x[i])*(x[j] - x[i]));
					slopes.add(new Line(slope,length));
			}
		
		Collections.sort(slopes);
		int i = 0;
		
		long cPairs = 0;
		while(i<slopes.size())
		{
			boolean entered = false;
			int c = 1;
			while(i<slopes.size()-1 && slopes.get(i).equals(slopes.get(i+1)))
			{
//				System.out.println(i);
				c++;
				i++;
				entered = true;
			}
			if(i == slopes.size()-1)
			{
				if(slopes.get(i).equals(slopes.get(0)))
					c++;
			}
			cPairs += c*(c-1)/2;
			i++;
			
			
		}
		
		
//		System.out.println(slopes);
		System.out.println(cPairs/2);

	}
	
	
	static class Line implements Comparable<Line>
	{
		double slope;
		long length;
		public Line(double x, long y)
		{
			this.slope = x;
			this.length = y;
		}
		@Override
		public int compareTo(Line l) {
			if(Math.abs(this.slope - l.slope)< 1e-9)
				if(this.length < l.length)
					return -1;
				else if(this.length > l.length)
					return 1;
				else return 0;
			if(this.slope > l.slope)
				return 1;
			else return -1;
		}
		
		public boolean equals(Line l)
		{
			return Math.abs(this.slope - l.slope) < 1e-9 && Math.abs(this.length - l.length) < 1e-9; 
		}
		
		public String toString()
		{
			return "("+slope+","+length+")";
		}
	}

}
