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
//package CodeForces.EducationalRound11;

import javafx.util.Pair;

import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeMap;

/**
 * Created by ilya on 09.04.16.
 */

public class D660 {
    public static void main(String[] args) {
        sc sc = new sc();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int n = sc.nextInt();
        //Pair<Integer, Integer>[] ds = new Pair[n];
        int[] x = new int[n], y = new int[n];
        for (int i = 0; i < n; i++) {
            //ds[i] = new Pair<>(sc.nextInt(), sc.nextInt());
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }
        //HashMap<Pair<Integer, Integer>, Integer> m = new HashMap<>();
        TreeMap<Long, Integer> m = new TreeMap<>();
        long ans = 0;
        for (int i = 0; i < n; i++) {
            for (int j = i+1; j < n; j++) {
                //Pair<Integer, Integer> s = new Pair((ds[j].getKey() + ds[i].getKey()), (ds[j].getValue() + ds[i].getValue()));/*(int) Math.sqrt(Math.pow(ds[i].getKey()- ds[j].getKey(), 2) + Math.pow(ds[i].getValue() - ds[j].getValue(),2));*/
                long h = hash(x[i], x[j], y[i], y[j]);
                if (m.containsKey(h)) {
                    ans += m.get(h);
                    m.put(h, m.get(h)+1);
                }
                else m.put(h,1);
            }
        }


        /*for (Map.Entry<Pair<Integer, Integer>, Integer> integerIntegerEntry : m.entrySet()) {
            ans+=(integerIntegerEntry.getValue()*(integerIntegerEntry.getValue()-1))/2;
        }*/
        out.println(ans);
        out.close();
    }

    static long hash(int x1, int x2, int y1, int y2) {
        return ((x1+(long)x2) << 32) | (y1 + y2);
    }


    public static class sc {
        BufferedReader br;
        StringTokenizer st;

        public sc() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        Integer nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}

