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

import java.lang.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        Point[] coor = new Point[n];

        for(int i = 0; i < n; i++)
        {
            int x = sc.nextInt();
            int y = sc.nextInt();
            coor[i] = new Point(x, y);
        }

        Point[] mid = new Point[n * (n-1) / 2];
        int counter = 0;
        for(int i = 0; i < n - 1; i++)
        {
            for(int j = i + 1; j < n; j++)
            {
                mid[counter] = new Point((coor[i].getX() + coor[j].getX())/2, (coor[i].getY() + coor[j].getY())/2 );
                counter++;
            }
        }

        Arrays.sort(mid, new CustomComp());

        double sum = 0;
        int count = 1;

        for(int i = 1; i < mid.length; i++)
        {
            if(mid[i].getX() == mid[i-1].getX() && mid[i].getY() == mid[i-1].getY())
            {
                count++;
            }
            else
            {
                if(count >= 2)
                {
                    sum += choose(count, 2);
                }
                count = 1;
            }
        }

        System.out.println((long) sum);

    }


    public static double choose(int x, int y) {
        if (y < 0 || y > x) return 0;
        if (y > x/2) {
            // choose(n,k) == choose(n,n-k),
            // so this could save a little effort
            y = x - y;
        }

        double denominator = 1.0, numerator = 1.0;
        for (int i = 1; i <= y; i++) {
            denominator *= i;
            numerator *= (x + 1 - i);
        }
        return numerator / denominator;
    }

    public static class CustomComp implements Comparator<Point>
    {
        public int compare(Point c1, Point c2)
        {
            if(c1.getX() == c2.getX())
            {
                if(c1.getY() <= c2.getY()) return -1;
                else return 1;
            }
            else
            {
                if(c1.getX() <= c2.getX()) return -1;
                else return 1;
            }
        }
    }
}

class Point
{
    private double x;
    private double y;

    public Point(double pX, double pY)
    {
        x = pX;
        y = pY;
    }

    public void setX(double pX)
    {
        x = pX;
    }
    public double getX()
    {
        return x;
    }

    public void setY(double pY)
    {
        y = pY;
    }
    public double getY()
    {
        return y;
    }
}

