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 A implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

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

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

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

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

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

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

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

    public static void main(String[] args) {
        //new Thread(null, new A(), "", 128 * (1L << 20)).start();
        new A().run();
    }

    long timeBegin, timeEnd;

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

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    class Point {
        int x, y;
        int id;

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

        Point rotate90(Point center) {
            Point res = new Point(x, y);
            res.x -= center.x;
            res.y -= center.y;
            int swap = res.x;
            res.x = -res.y;
            res.y = swap;
            res.x += center.x;
            res.y += center.y;
            return res;
        }

        boolean equal(Point o) {
            return o.x == x && o.y == y;
        }
    }

    long getDistSqr(Point p1, Point p2) {
        long dx = p1.x - p2.x;
        long dy = p1.y - p2.y;
        return dx * dx + dy * dy;
    }

    long getLong(int x1, int x2) {
        return ((1l * x1) << 32) + x2;
    }

    class Pair implements Comparable<Pair> {
        int x, y;

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

        @Override
        public int compareTo(Pair o) {
            if (x == o.x) return Integer.compare(y, o.y);
            return Integer.compare(x, o.x);
        }
    }

    private void solve() throws IOException {
        int n = readInt();

        int[] x = new int[n], y = new int[n];
        for (int i = 0; i < n; i++) {
            x[i] = readInt();
            y[i] = readInt();
        }

        int segmentsCount = n * (n - 1) / 2;
        Point[] centers = new Point[segmentsCount];
        int sId = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < i; j++) {
                centers[sId++] = new Point(x[i] + x[j], y[i] + y[j]);
            }
        }

        long answer = 0;
        Arrays.sort(centers, new Comparator<Point>() {
            @Override
            public int compare(Point o1, Point o2) {
                if (Integer.compare(o1.x, o2.x) == 0)
                    return Integer.compare(o1.y, o2.y);
                return Integer.compare(o1.x, o2.x);
            }
        });
        int curCount = 1;
        for (int i = 1; i < segmentsCount; i++) {
            if (centers[i].equal(centers[i - 1])) {
                curCount++;
            } else {
                answer += 1l * curCount * (curCount - 1) / 2;
                curCount = 1;
            }
        }
        answer += 1l * curCount * (curCount - 1) / 2;
        out.println(answer);
    }
}