using System;
using System.Drawing;
using System.Collections.Generic;

namespace konzola
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            Console.WriteLine(m(n));
        }
        static Point f(Point p1, Point p2)
        {
            int x = p1.X - p2.X;
            int y = p1.Y - p2.Y;
            if (x == 0) y = Math.Abs(y);
            else if (x < 0)
            {
                x = -x;
                y = -y;
            }
            return new Point(x, y);
        }

        static int m(int n)
        {
            if (n < 4) return 0;
            int b = 0;
            int i, br;
            int x = (n * (n - 1)) / 2;
            Point[] l = new Point[x];
            Point[] t = new Point[n];
            HashSet<Point> set = new HashSet<Point>();
            for (i = 0, br = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                t[i].X = int.Parse(s[0]);
                t[i].Y = int.Parse(s[1]);
                for (int i0 = 0; i0 < i; i0++, br++)
                {
                    l[br] = f(t[i], t[i0]);
                    set.Add(l[br]);
                }
            }
            for (i = 0; i < x; i++)
            {
                if (l[i].X % 2 == 0 && l[i].Y % 2 == 0) if (set.Contains(new Point(l[i].X / 2, l[i].Y / 2))) b++;
            }
            return b;
        }
    }
}