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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;


public class Challenge 
{
    static InputReader in = new InputReader(System.in);
    static OutputWriter out = new OutputWriter(System.out);

    
    static class point
    {
        double x, y;
        
        public point(double x, double y)
        {
            this.x = x;
            this.y = y;
        }
        
        @Override
        public boolean equals(Object obj) 
        {
            return ((obj instanceof point)  &&  ((point)obj).x == x  &&  ((point)obj).y == y);
        }

        @Override
        public int hashCode() 
        {
            return 97 * (int)x + (int)y;
        }
    };
    
    static class line
    {
        public point a, b;
        
        public line(point a, point b)
        {
            this.a = a;
            this.b = b;
        }
    }
     
    static int N;
    static long X, Y, answer;
    static List<point> points = new ArrayList<point>();
    static List<line> lines = new ArrayList<line>();
    static Map<point, Long> mid_points = new HashMap<point, Long>();
            
            
    public static void main(String[] args) 
    {    
        N = in.readInt();
        
        for(int i=0; i<N; ++i)
        {
            X = in.readLong();
            Y = in.readLong();
            
            points.add(new point((double)X, (double)Y));
        }
        
        
        for(int i=0; i<N; ++i)
            for(int j=i+1; j<N; ++j)
                lines.add(new line(points.get(i), points.get(j)));
         
        for(int i=0; i<lines.size(); ++i)
        {
            double x1 = lines.get(i).a.x;
            double y1 = lines.get(i).a.y;
            double x2 = lines.get(i).b.x;
            double y2 = lines.get(i).b.y;
            
            point mid_pnt = new point((x1 + x2) / 2, (y1 + y2) / 2);
            
            long old_val = 0;
            
            if(mid_points.containsKey(mid_pnt))
                old_val = mid_points.get(mid_pnt);
            
            mid_points.put(mid_pnt, old_val + 1);
        }            
        
        for(Long val: mid_points.values())
            answer += val * (val - 1) / 2;
        
        
        out.printLine(answer);
        
        out.close();
    }
    
 
    static interface SpaceCharFilter 
    {
        public boolean isSpaceChar(int ch);
    }
    
    static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

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

        public int read() 
        {
            if (numChars == -1)
                throw new InputMismatchException();
            
            if (curChar >= numChars) 
            {
                curChar = 0;
                
                try 
                {
                    numChars = stream.read(buf);
                } 
                catch (IOException e) 
                {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            
            return buf[curChar++];
        }

        public int readInt() 
        {
            int c = read();
            int sgn = 1, res = 0;

            while (isSpaceChar(c))
                    c = read();

            if (c == '-') 
            {
                sgn = -1;
                c = read();
            }

            do 
            {
                if (c < '0' || c > '9')
                        throw new InputMismatchException();               
             
                res *= 10;
                res += c - '0';
                c = read();
                
            } while (!isSpaceChar(c));

            return res * sgn;
        }
              
        public long readLong() 
        {
            int c = read();
            int sgn = 1;
            long res = 0;

            while (isSpaceChar(c))
                    c = read();

            if (c == '-') 
            {
                sgn = -1;
                c = read();
            }

            do 
            {
                if (c < '0' || c > '9')
                        throw new InputMismatchException();               
             
                res *= 10;
                res += c - '0';
                c = read();
                
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public String readString() 
        {
            int c = read();

            while (isSpaceChar(c))
                    c = read();

            StringBuilder res = new StringBuilder();

            do 
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) 
        {
            if (filter != null)
                    return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() 
        {
            return readString();
        }
    }
 
    static class OutputWriter 
    {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) 
        {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) 
        {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object...objects) 
        {
            for (int i = 0; i < objects.length; i++) 
            {
                if (i != 0)
                    writer.print(' ');

                writer.print(objects[i]);
            }
        }

        public void printLine(Object...objects) 
        {
            print(objects);
            writer.println();
        }

        public void close() 
        {
            writer.close();
        }

        public void flush()
        {
            writer.flush();
        }
    }
}
