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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class CFD {

	public static void main(String[] args) throws IOException {
		FastScanner5 in = new FastScanner5();
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		long[][] p = new long[n][2];
		for (int i = 0; i<n; i++){
			p[i][0] = in.nextLong();
			p[i][1] = in.nextLong();
		}
		HashMap<Pair, Integer> h = new HashMap<>();
		for (int i = 0; i<n; i++){
			for (int j = i+1; j<n; j++){
				long d = dist(p[i][0], p[i][1], p[j][0], p[j][1]);
				Pair pa = new Pair(new Drob(p[j][1]-p[i][1], p[j][0]-p[i][0]), d);
				if (h.containsKey(pa)){
					h.put(pa, h.get(pa)+1);
				} else {
					h.put(pa, 1);
				}
			}
		}
		long ans = 0;
		for (Integer i:h.values()){
			ans+=i*(i-1)/2;
		}
		ans/=2;
		System.out.println(ans);
		
		
		
	}
	
	static long dist(long x1, long y1, long x2, long y2){
		return (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
	}

}

class Pair{
	Drob d;
	long size;
	Pair(Drob d, long size){
		this.d = d;
		this.size = size;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((d == null) ? 0 : d.hashCode());
		result = prime * result + (int) (size ^ (size >>> 32));
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Pair other = (Pair) obj;
		if (d == null) {
			if (other.d != null)
				return false;
		} else if (!d.equals(other.d))
			return false;
		if (size != other.size)
			return false;
		return true;
	}
}

class Drob{
	
	long a;
	long b;
	
	Drob(long a, long b){
		long g = gcd(a, b);
		/*if (g==0){
			a = Long.MAX_VALUE;
			b = Long.MAX_VALUE;
		} else {*/
		this.a = a/g;
		this.b = b/g;
		//}
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (a ^ (a >>> 32));
		result = prime * result + (int) (b ^ (b >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Drob other = (Drob) obj;
		if (a != other.a)
			return false;
		if (b != other.b)
			return false;
		return true;
	}

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

class FastScanner5{

	BufferedReader reader;
	StringTokenizer tokenizer;

	FastScanner5() throws IOException{
		reader = new BufferedReader(new InputStreamReader(System.in));
		tokenizer = null;
	}

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

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

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

	double nextDouble() throws IOException{
		return Double.parseDouble(next());
	}

}