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

public class Template implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            String filename = "";
            if (filename.isEmpty()) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader(filename + ".in"));
                out = new PrintWriter(filename + ".out");
            }
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] res = new int[size];
        for (int i = 0; i < size; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }


    <T> List<T>[] createGraphList(int size) {
        List<T>[] list = new List[size];
        for (int i = 0; i < size; i++) {
            list[i] = new ArrayList<>();
        }
        return list;
    }

    public static void main(String[] args) {
        new Thread(null, new Template(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    long c(int n, int k) {
        int cur = 2;
        long res = 1;
        for (int i = n - k + 1; i <= n; i++) {
            res *= i;
            while (cur <= k && res % cur == 0) {
                res /= cur;
                cur++;
            }
        }
        return res;
    }

    class Brut {
        TreeSet<String> set = new TreeSet<>();
        int[] a;

        Brut(int len, int n) {
            a = new int[len];
            brut(0, n);
        }

        void brut(int pos, int ost) {
            if (pos == a.length) {
                if (ost == 0) {
                    String x = "";
                    for (int z : a) x += z;
                    set.add(x);
                }
                return;
            }
            for (int i = 1; i <= ost; i++) {
                a[pos] = i;
                brut(pos + 1, ost - i);
            }
        }
    }

    long comb(long x, long y) {
        long y1 = y & ((1 << 16) - 1);
        long y2 = y - y1;
        y2 = y2 >> 16;
        y1 = y1 << 16;
        y = y1 | y2;
        return x | (y << 32);
    }

    long calc(long x) {
        return x * (x - 1) / 2;
    }

    void solve() throws IOException {
        int n = readInt();
        int[] x = new int[n];
        int[] y = new int[n];

        HashMap<Long, Integer> map = new HashMap<>();

        for (int i = 0; i < n; i++) {
            x[i] = readInt();
            y[i] = readInt();
            for (int j = 0; j < i; j++) {
                long val = comb(x[j] + x[i], y[j] + y[i]);
                map.put(val, map.getOrDefault(val, 0) + 1);
            }
        }

        long answer = 0;
        for (Map.Entry<Long, Integer> e : map.entrySet()) {
            answer += 1l * e.getValue() * (e.getValue() - 1) / 2;
        }
        out.println(answer);
    }


}