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
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fcking interest
*******************************
I'm standing on top of my Monopoly board
That means I'm on top of my game and it don't stop
til my hip don't hop anymore
https://www.a2oj.com/Ladder16.html
*******************************
300iq as writer = Sad!
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class x660D
   {
      static final long CONS = 1000000002L;
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         Point[] arr = new Point[N];
         for(int i=0; i < N; i++)
         {
            st = new StringTokenizer(infile.readLine());
            int x = Integer.parseInt(st.nextToken());
            int y = Integer.parseInt(st.nextToken());
            arr[i] = new Point(x,y);
         }
         HashMap<Long, Integer>[] map = new HashMap[4];
         for(int i=0; i < 4; i++)
            map[i] = new HashMap<Long, Integer>();
         for(int a=0; a < N; a++)
            for(int b=a+1; b < N; b++)
            {
               int x = arr[b].x+arr[a].x;
               int y = arr[b].y+arr[a].y;
               int dex = (x&1)*2+(y&1);
               push(map[dex], x*CONS+y);
            }
         int res = 0;
         for(int i=0; i < 4; i++)
            for(long k: map[i].keySet())
               res += map[i].get(k)*(map[i].get(k)-1)/2;
         System.out.println(res);
      }
      public static void push(HashMap<Long, Integer> map, long k)
      {
         if(!map.containsKey(k))
            map.put(k, 0);
         map.put(k, map.get(k)+1);
      }
   }
   class Point
   {
      public int x;
      public int y;
      
      public Point(int a, int b)
      {
         x = a;
         y = b;
      }
   }