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

public class Parallelogram {
	int x;
	int y;
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	
	Parallelogram(int x, int y)
	{
		this.x = x;
		this.y =y;
	}
public static void main(String[] args)
{
	long count=0;
	List<Parallelogram> pts = new ArrayList<>();
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	if(n>=4) {
		
	
	for(int i=0; i<n; i++){
	int x = sc.nextInt();
	int y =sc.nextInt();
	Parallelogram p = new Parallelogram(x, y);
	pts.add(p);
	}
	List<Parallelogram> mpts = new ArrayList<>();
	for(int i=0; i<n; i++){
		for(int j=i+1; j<n; j++){
			int x = pts.get(i).x+pts.get(j).x;
			int y = pts.get(i).y+pts.get(j).y;
			Parallelogram p = new Parallelogram(x, y);
			mpts.add(p);
		}
	}	
	Collections.sort( mpts, new Comparator<Parallelogram>() {
	       public int compare(Parallelogram x1, Parallelogram x2) {
	         int result = Long.compare(x1.getX(), x2.getX());
	         if ( result == 0 ) {
	             result = Long.compare(x1.getY(), x2.getY());
	           } 
	         return result;
	      }
	    });
			 
			 int dup =1;
			 int size = mpts.size();
			// System.out.println("size"+size);
			/*
			 * for(int i =0; i<size; i++) {
			 * System.out.println(mpts.get(i).x+" "+mpts.get(i).y); }
			 */
			// System.out.println(size+ "size");
			 for(int i =1; i<=size; i++)
				{
					if(i<size&&mpts.get(i).x==mpts.get(i-1).x&&mpts.get(i).y==mpts.get(i-1).y) {
						//System.out.println("match"+mpts.get(i).x+" "+mpts.get(i).y);
						dup++;	
					//	System.out.println("match count"+dup);
						
					}	
					else {
						//System.out.println("dup count "+dup);
						count += (long) dup * (dup - 1) / 2;
						dup = 1;
					}
				}
	System.out.println(count);
	}
	else {
		System.out.println(count);
	}
 }
}
