using System;

namespace ConsoleApp1
{
    class Program
    {

        static double K(int x1, int y1, int x2, int y2)
        {
            return (x1 != x2) ? (double)(y1 - y2) / (x1 - x2) : double.MaxValue;
        }

        static double Rastojanje(int a, int b, int c, int d)
        {
            return Math.Sqrt(Math.Pow(c - a, 2) + Math.Pow(d - b, 2));
        }

        static void Main(string[] args)
        {
            int u = 0;
            int n = int.Parse(Console.ReadLine());
            int[] x = new int[n], y = new int[n];
            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                x[i] = int.Parse(s[0]);
                y[i] = int.Parse(s[1]);
                u += i;
            }
            double[] a = new double[u + 1], b = new double[u + 1];
            u = 0;
            for (int i = 0; i < n - 1; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    a[u] = K(x[i], y[i], x[j], y[j]);
                    b[u++] = Rastojanje(x[i], y[i], x[j], y[j]);
                }
            }
            u = 0;
            for (int i = 0; i < a.Length - 2; i++)
            {
                for (int j = i + 1; j < a.Length - 1; j++)
                {
                    if (a[i] == a[j] && (b[i] * 2 == b[j] || b[j] * 2 == b[i]))
                    {
                        u++;
                    }
                }
            }
            Console.WriteLine(u);
        }
    }
}