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.*;

public class Main1 {

	static long INF = Long.MAX_VALUE;

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        long[][] pt = new long[n][2];
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < 2 ; j++) {
                pt[i][j] = sc.nextLong() * 2;
            }
        }

        int upto = 2000*(2000-1)/2;
        long[] hv = new long[upto];


        int hi = 0;
        for (int i = 0; i < n ; i++) {
            for (int j = i+1 ; j < n ; j++) {
                long medX = (pt[i][0]+pt[j][0])/2;
                long medY = (pt[i][1]+pt[j][1])/2;
                hv[hi++] = medX * 2000000000 + medY;
            }
        }
        hv = Arrays.copyOf(hv, hi);
        for (int i = 0; i < hi ; i++) {
            int tmp = (int)(Math.random() * hi);
            long t = hv[i];
            hv[i] = hv[tmp];
            hv[tmp] = t;
        }
        Arrays.sort(hv);

        long ans = 0;
        for (int i = 0; i < hi ; ) {
            int j = i;
            while (j < hi && hv[i] == hv[j]) {
                j++;
            }
            long cnt = j - i;
            ans += cnt * (cnt-1) / 2;
            i = j;
        }
        System.out.println(ans);
		
		sc.close();

	}
	
	private static int binarySearch(Integer value, List<Pile> piles) {
		
//		System.out.println(value);
		
		int left = 0;
		int right = piles.size();
		
		int index = 0;
		while(left < right){
			int mid = (left + right) / 2;
			
			Pile p = piles.get(mid);
//			System.out.println(p.left + " " + p.right);
			if(value < p.left){
				right = mid;
			}
		
			else if(value > p.right){
				left = mid + 1;
			}
			
			else if (value >= p.left && value <= p.right){
			 index = mid + 1;
			 break;
			}
			
//			System.out.println(left + " " + right);
		}
//		System.out.println(index);
		return index;
	}

	private static class Pile{
		int left;
		int right;
		
		Pile(int left, int right){
			this.left = left;
			this.right = right;
		}
	}
	
     private static class Dragons implements Comparable<Dragons>{
    	 int st;
    	 int bonus;
    	 
    	 
    	 Dragons(int st, int bonus){
    		 this.st = st;
    		 this.bonus = bonus;
    	 }


		@Override
		public int compareTo(Dragons o) {
			if(this.st < o.st)
				return -1;
			else if(this.st > o.st)
				return 1;
			else{
				return o.bonus - this.bonus;
			}
			
		}
    	 
     }

	
}
