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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer buffer;

    static class Pair {
        int x, y;
        public Pair(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Pair pair = (Pair) o;

            if (x != pair.x) return false;
            return y == pair.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 5831 * result + y;
            return result;
        }
    }

    public static void solve() {
        int n = ni();
        Pair[]p = new Pair[n];
        for (int i=0;i<n;i++) p[i] = new Pair(ni(), ni());

        Map<Pair, Integer>mid = new HashMap<Pair, Integer>(n*n);
        for (int i=0;i<n-1;i++) {
            for (int j=i+1;j<n;j++) {
                int midx = p[i].x + p[j].x;
                int midy = p[i].y + p[j].y;
                Pair m = new Pair(midx, midy);

                Integer val = mid.get(m);
                if (val == null) {
                    mid.put(m, 1);
                } else mid.put(m, val+1);
            }
        }

        long total = 0;
        for (Integer val: mid.values()) {
            total += ((long)val*(val-1))/2;
        }
        out.println(total);
    }

    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    static String next() {
        while (buffer == null || !buffer.hasMoreElements()) {
            try {
                buffer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
            }
        }
        return buffer.nextToken();
    }

    static int ni() {
        return Integer.parseInt(next());
    }

    static long nl() {
        return Long.parseLong(next());
    }

    static double nd() {
        return Double.parseDouble(next());
    }

    static String ns() {
        return next();
    }

    static int[] ni(int n) {
        int[] res = new int[n];
        for (int i = 0; i < n; i++)
            res[i] = Integer.parseInt(next());
        return res;
    }

    static long[] nl(int n) {
        long[] res = new long[n];
        for (int i = 0; i < n; i++)
            res[i] = Long.parseLong(next());
        return res;
    }

    static double[] nd(int n) {
        double[] res = new double[n];
        for (int i = 0; i < n; i++)
            res[i] = Double.parseDouble(next());
        return res;
    }

    static String[] ns(int n) {
        String[] res = new String[n];
        for (int i = 0; i < n; i++)
            res[i] = next();
        return res;
    }

}