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.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.io.*;
import java.util.*;

public class EC11D
{

private static StringTokenizer st;
    
    public static void nextLine(BufferedReader br) throws IOException
    {
        st = new StringTokenizer(br.readLine());
    }
    
    public static int nextInt()
    {
        return Integer.parseInt(st.nextToken());
    }
    
    public static String next()
    {
        return st.nextToken();
    }
    
    public static long nextLong()
    {
        return Long.parseLong(st.nextToken());
    }

    public static double nextDouble()
    {
        return Double.parseDouble(st.nextToken());
    }
    
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        nextLine(br);
        int n = nextInt();
        int[] x = new int[n];
        int[] y = new int[n];
        HashMap<Long, Integer> counts = new HashMap<Long, Integer>();
        for (int i = 0; i < n; i++)
        {
            nextLine(br);
            x[i] = nextInt();
            y[i] = nextInt();
        }
        for (int i = 0; i < n; i++)
        {
            for (int j = i + 1; j < n; j++)
            {
                Long g = reduce(x[i] - x[j], y[i] - y[j]);
                if (counts.containsKey(g))
                {
                    counts.put(g, counts.get(g) + 1);
                }
                else
                {
                    counts.put(g, 1);
                }
            }
        }
        long sum = 0;
        for (Map.Entry<Long, Integer> entry : counts.entrySet())
        {
            long val = entry.getValue();
            sum += (val * (val - 1)) / 2;
        }
        System.out.println(sum/2);
        
    }
    
    static Long reduce(int a, int b)
    {
        long aa = a;
        long bb = b;
        if (aa < 0)
        {
            aa = -aa;
            bb = -bb;
        }
        else if (aa == 0)
        {
            bb = Math.abs(bb);
        }
        long val = aa * 4000000028L + bb;
        if (bb < 0)
        {
            val += (1L << 31);
        }
        return new Long(val);
    }
    
}