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.TreeMap;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        DNumberOfParallelograms solver = new DNumberOfParallelograms();
        solver.solve(1, in, out);
        out.close();
    }

    static class DNumberOfParallelograms {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            Tuple[] points = new Tuple[n];
            int i = 0, j = 0;
            for (i = 0; i < n; i++)
                points[i] = new Tuple(ni(), ni());
            TreeMap<Long, Integer> map = new TreeMap<Long, Integer>();
            long ans = 0;
            for (i = 0; i < n; i++) {
                for (j = i + 1; j < n; j++) {
                    long hash = hash(points[i].x, points[j].x, points[i].y, points[j].y);
                    if (map.containsKey(hash)) {
                        int cnt = map.get(hash);
                        ans += cnt;
                        map.put(hash, cnt + 1);
                    } else {
                        map.put(hash, 1);
                    }
                }
            }
            pn(ans);
        }

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

        int ni() {
            return in.nextInt();
        }

        void pn(long zx) {
            out.println(zx);
        }

        class Tuple {
            long x;
            long y;

            Tuple(long a, long b) {
                x = a;
                y = b;
            }

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

