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.geom.Point2D;
import java.awt.geom.Point2D.Double;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Scanner;
import java.util.StringTokenizer;

public class NumberofParallelograms {

	public static void main(String[] args) {
		InputReader1 in = new InputReader1(System.in);
		int n = in.nextInt();
		int [][] points = new int [n][2];
		HashMap<point, Integer> hashMap  = new HashMap<>();
		for (int i = 0; i < points.length; i++) {
			points[i][0] = in.nextInt();
			points[i][1] = in.nextInt();
			for (int j = i-1; j > -1; j--) {
				
				point x =new point((points[j][0] + points[i][0]) , (points[j][1] + points[i][1]));
				if (hashMap.containsKey(x)) {
					hashMap.replace(x, hashMap.get(x) + 1);
				}else {
					hashMap.put(x, 1);
				}
			}
		}
		int ans = 0;
		Object[] x =  hashMap.values().toArray();
		
		for (int i = 0; i < x.length; i++) {
			ans+= (int)x[i]*((int)x[i] - 1)/2;
		}
		System.out.println(ans);

	}

}
class point{
	int x;
	int y;
	
	public point(int x, int y) {
		this.x = x;
		this.y = y;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + x;
		result = prime * result + y;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		
		point other = (point) obj;
		if (x != other.x)
			return false;
		if (y != other.y)
			return false;
		return true;
	}
	
	
}
class InputReader1 {
	BufferedReader reader;
	StringTokenizer tokenizer;

	public InputReader1(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream));
		tokenizer = null;
	}

	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

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

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

}