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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author FinnTheHuman
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            Pair[] v = new Pair[n];
            for (int i = 0; i < n; ++i) v[i] = new Pair(in.nextInt(), in.nextInt());
            Arrays.sort(v);
            long ans = 0;

            HashMap<Pair, Integer> freqs = new HashMap<>();

            for (int i = 0; i < n; ++i) {
                for (int j = i + 1; j < n; ++j) {
                    Pair np = new Pair(v[j].x - v[i].x, v[j].y - v[i].y);
                    int oldFreq = freqs.containsKey(np) ? freqs.get(np) : 0;
                    freqs.put(np, oldFreq + 1);
                }
            }

            for (Pair x : freqs.keySet()) {
                long freq = (long) freqs.get(x);
                ans += freq * (freq - 1) / 2;
            }

            out.println(ans / 2);
        }

    }

    static class Pair implements Comparable<Pair> {
        public int x;
        public int y;

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


        public int compareTo(Pair other) {
            if (x != other.x) return x - other.x;
            return y - other.y;
        }


        public boolean equals(Object other) {
            return compareTo((Pair) other) == 0;
        }


        public int hashCode() {
            return (101 * x) ^ (103 * y);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 65536 / 2);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}

