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.*;
import java.io.*;

public class DFast {
    FastScanner in;
    PrintWriter out;

    class Pair {
        int x, y;

        public Pair(int _x, int _y) {
            x = _x;
            y = _y;
            if (x < 0 || x == 0 && y < 0) {
                x *= -1;
                y *= -1;
            }
        }

        @Override
        public boolean equals(Object o) {
            return o instanceof Pair && ((Pair) o).x == x && ((Pair) o).y == y;
        }

        @Override
        public int hashCode() {
            return 97 * x + y;
        }
    }

    public void solve() throws IOException {
//        Random rnd = new Random(20051508);
//        long start = System.currentTimeMillis();
//        int n = 2000;
        int n = in.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];
        for (int i = 0; i < n; i++) {
            x[i] = in.nextInt();
            y[i] = in.nextInt();
//            x[i] = rnd.nextInt(1_000_000_000);
//            y[i] = rnd.nextInt(1_000_000_000);
        }
        Map<Pair, Long> cnt = new HashMap<>();
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                Pair v = new Pair(x[i] - x[j], y[i] - y[j]);
                cnt.compute(v, (k, val) -> val == null ? 1 : val + 1);
            }
        }
        long ans = 0;
        for (long xx : cnt.values()) {
            ans += xx * (xx - 1) / 2;
        }
        out.println(ans / 2);
//        System.out.println(System.currentTimeMillis() - start);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
            Locale.setDefault(Locale.US);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

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

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

    public static void main(String[] arg) {
        new DFast().run();
    }
}