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.*;
import java.math.BigInteger;
import java.util.*;


/*
 * Sadekujjaman Saju
 * 
 */

public class Main {

	
	static int INF = Integer.MAX_VALUE;
	static int N_INF = Integer.MIN_VALUE;

	static int dp[] = new int[1005];

	static int vis[] = new int[1005];
	
	static int dirX[] = {-1, 1, 0, 0};
	static int dirY[] = {0, 0, -1, 1};
	
	static int divCount[] = new int[1000005];
	
	
	public static void main(String args[]) throws IOException {

		Scanner sc = new Scanner(System.in);

	
		int n = sc.nextInt();
		
		Point points[] = new Point[n + 4];
		
//		Map<Pair, Integer> map = new HashMap<>();
		
		
		for(int i = 0; i < n; i++){
			long x = sc.nextLong();
			long y = sc.nextLong();
			points[i] = new Point(x, y);
		}
//		Map<Long, Map<Long, Long>> map = new HashMap<>();
		long res = 0;
		Map<Long, Long> map = new HashMap<>();
		long mult = (long)(2e9+7);
		for(int i = 0; i < n; i++){
			for(int j = i + 1; j < n; j++){
			    long key = mult *  (points[i].x + points[j].x) + (points[i].y + points[j].y);
			    
			    
			    long c = map.containsKey(key) ? map.get(key) : 0L;
				res += c;
				map.put(key,  c+1);
			    
//				if(!map.containsKey(key)){
//					Map<Long, Long> m = new HashMap<>();
//					m.put(points[i].y + points[j].y,  1L);
//					map.put(key, m);
//				}
//				else{
//					Map<Long, Long> m = map.get(key);
//					if(m.containsKey(points[i].y + points[j].y)){
//						m.put(points[i].y + points[j].y, m.get(points[i].y + points[j].y) + 1);
//					}
//					else{
//						m.put(points[i].y + points[j].y, 1L);
//					}
//				}
			    
			}
		}
		System.out.println(res);
//		long ans  = 0;
//		for(Long key : map.keySet()){
//			Map<Long, Long> m = map.get(key);
//			for(Long l : m.keySet()){
//				long val = m.get(l);
//				ans += (val * (val - 1)) / 2;
//			}
//		}
//	System.out.println(ans);
		
		
		sc.close();
		
	}	
//	private static class Node{
//		Point A;
//		Point B;
//		Point C;
//		
//		Node(Point A, Point B, Point C){
//			this.A = A;
//			this.B = B;
//			this.C = C;
//		}
//	}
//
	
	private static class Pair{
		int first;
		int second;
		
		Pair(int first, int second){
			this.first = first;
			this.second = second;
		}
	}
	private static class Point{
		long x; 
		long y;
		public Point(long x, long y){
			this.x = x;
			this.y = y;
		}
	}

}