using System;

namespace _3._zad_takm
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
           
                double[] linija = new double[1000000];
                long[] x = new long[n];
                long[] y = new long[n];
                double[] yr = new double[1000000];
            long[] presek = new long[10000000];
            for (int i = 0; i < n; i++)
                {
                    string[] unos = Console.ReadLine().Split();
                    x[i] = int.Parse(unos[0]);
                    y[i] = int.Parse(unos[1]);
                }
            if (n < 4)
            {

                Console.WriteLine(0);
            }
            else
            {
                int br = 0;
                for (int i = 0; i < n - 1; i++)
                {
                    for (int j = i + 1; j < n; j++)
                    {
                   
                        long xr = Math.Abs(x[i]- x[j]);
                      
                        yr[br] = Math.Abs(y[i] - y[j]);

                        if (xr == 0)
                        {
                            linija[br] = Double.PositiveInfinity;
                        }
                        else
                        {
                            linija[br] = yr[br] / xr;
                        }
                        presek[br] = y[i];
                        br++;

                    }
                }

                int brr = 0;

                for (int i = 0; i < br - 1; i++)
                {
                    for (int j = i + 1; j < br; j++)
                    {
                        if (linija[i] == linija[j] && (yr[i] * 2 == yr[j]) && presek[i] != presek[j])
                        {
                            brr++;
                        }
                    }
                }
                Console.WriteLine(brr);
            }
        }

    }
}