using System;

namespace ConsoleApp53
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine()); string[] s; int l = 0;
            int[] x = new int[n]; int[] y = new int[n]; double[] k = new double[n * (n - 1)]; double[] d = new double[n * (n - 1)]; int br = 0;
            for (int i = 0; i < n; i++)
            {
                s = Console.ReadLine().Split();
                x[i] = int.Parse(s[0]);
                y[i] = int.Parse(s[1]);
            }
            for (int i = 0; i < n; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    if (i != j)
                    {
                        k[l] = (double)(y[j] - y[i]) / (x[j] - x[i]);
                        d[l] = (double)(Math.Sqrt((x[j] - x[i]) * (x[j] - x[i]) + (y[j] - y[i]) * (y[j] - y[i])));

                        l++;
                    }
                }
            }
            for (int i = 0; i < l; i++)
            {

                for (int j = i + 1; j < l; j++)
                {

                    if (k[i] == k[j] && (d[i] / 2 - d[j]) == 0 || (d[i] - d[j] / 2 == 0))
                        br++;
                }
            }
            Console.WriteLine(br);

        }
    }
}