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

public class Parallelogram {
    int x;
    int y;

    // Constructor
    Parallelogram(int x, int y){
        this.x=x;
        this.y=y;
    }

    public static void main(String[] args) {
        int x,y;
        Scanner cin = new Scanner(System.in);
        int n= cin.nextInt();
        Parallelogram[] parallelogram= new Parallelogram[n];
        for (int i=0; i<n;i++){
            x= cin.nextInt();
            y= cin.nextInt();
            parallelogram[i]= new Parallelogram(x,y);
        }

        int selection= n*(n-1)/2; // number of ways we can choose two points from the given list
        int k=0;
        Parallelogram[] p= new Parallelogram[selection]; // array to store mid points of all possible line with the given points
        for(int i=0;i<n;i++){
            for(int j=i+1;j<n;j++){
                x=(parallelogram[i].x+parallelogram[j].x);
                y=(parallelogram[i].y+parallelogram[j].y);
                p[k++]= new Parallelogram(x,y);
            }
        }
        Arrays.sort(p,(p1,p2)-> p1.x!=p2.x ? p1.x-p2.x : p1.y-p2.y); // Sorting the mid points
        int count=1;
        long pairs=0;
        for(int i=1;i<=selection;i++){
            if(i<selection && p[i].x==p[i-1].x && p[i].y==p[i-1].y){
                count++;
            }
            else{
                pairs+=(long) count*(count-1)/2;
                count=1;
            }
        }

        System.out.println(pairs);
    }
}
