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

public class CodeforcesA {

    // Sachin_2961 submission ///
    public  void solve() {
        FastScanner fs = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
//        int tc = fs.nextInt();
        int tc = 1;
        while (tc-- > 0 ) {
            int n = fs.nextInt();
            Pair[]pairs = new Pair[n];
            for(int i=0;i<n;i++)
                pairs[i] = new Pair(fs.nextInt(),fs.nextInt());

            Map<String,Integer>cnt = new HashMap<>();
            for(int i=0;i<n;i++){
                for(int j=i+1;j<n;j++){
                    int x = pairs[i].x + pairs[j].x;
                    int y = pairs[i].y + pairs[j].y;
                    cnt.put(x+" "+y,cnt.getOrDefault(x+" "+y,0)+1);
                }
            }
            long ans = 0;
            for(String s:cnt.keySet()){
                long count = cnt.get(s);
//                out.println(count);
                ans += (count*(count-1))/2;
            }
            out.println(ans);
        }
        out.flush();
    }
    class Pair{
        int x,y;
        Pair(int x,int y){
            this.x = x;
            this.y = y;
        }
    }
    public static void main(String[]args){
        try{
            new CodeforcesA().solve();
        }catch (Exception e){
            e.printStackTrace();
        }

    }
    class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }
}