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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.stream.IntStream;

public class d {
    public static void main(String[] args) {
        FS in = new FS(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        new d().solve(in, out);
        
        out.close();
    }
    
    public void solve(FS in, PrintWriter out) {
        int n = in.nextInt();
        int tot = 0;
        long[] x = new long[n];
        long[] y = new long[n];
        ArrayList<Long> list = new ArrayList<>(n*(n-1)/2);
        for(int i = 0; i < n; i++) {
            x[i] = in.nextInt()<<1;
            y[i] = in.nextInt()<<1;
            for(int j = 0; j < i; j++) {
                long mx = (x[i] + x[j])>>1;
                long my = (y[i] + y[j])>>1;
                long val = (mx<<32)+my;
                list.add(val);
            }
        }
        long res = 0;
        Collections.sort(list);
        long prev = -1;
        int num = 0;
        for(long i : list) {
            if(i == prev) {
                num++;
            } else {
                res += (num*(num-1))>>1;
                prev = i;
                num = 1;
            }
        }
        res += (num*(num-1))/2;
        System.out.println(res);
        out.println();
    }
    
    static class FS {

        BufferedReader in;
        StringTokenizer token;
        
        public FS(InputStream str) {
            in = new BufferedReader(new InputStreamReader(str));
        }
        
        public String next() {
            if (token == null || !token.hasMoreElements()) {
                try {
                    token = new StringTokenizer(in.readLine());
                } catch (IOException ex) {
                }
                return next();
            }
            return token.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}