using System;
using System.Drawing;

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)
            {
                x = -x;
                y = -y;
            }
            return new Point(x, y);
        }
        static bool k(Point p1, Point p2)
        {
            return (p1.X == 2 * p2.X && p1.Y == 2 * p2.Y) || (p2.X == 2 * p1.X && p2.Y == 2 * p1.Y) || (p1.X == 0 && p2.X == 0 && (p1.Y + 2 * p2.Y == 0 || p2.Y + 2 * p1.Y == 0));
        }
        static int m(int n)
        {
            if (n < 4) return 0;
            int b = 0;
            int x = (n * (n - 1)) / 2;
            Point[] l = new Point[x];
            Point[] t = new Point[n];
            for (int 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]);
                    for (int i1 = 0; i1 < br; i1++) if (k(l[br], l[i1])) b += 1;
                }
            }
            return b;
        }
    }
}