using System;

namespace PREPISIVACI
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] x = new int[N], y = new int[N];
            int br = 0;
            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)
            {
                br = 0;
            }
            else
            {
                for(int i = 0; i < N - 1; i++)
                {
                    for(int j = i + 1; j < N; j++)
                    {
                        for(int k = i + 1; k < N - 1; k++)
                        {
                            for(int l = k + 1; l < N; l++)
                            {
                                if(k != i && l != j && daLiPrepisuju(x[i], y[i], x[j], y[j], x[k], y[k], x[l], y[l]))
                                {
                                    br++;
                                }
                            }
                        }
                    }
                }
            }
            Console.WriteLine(br);
        }

        static bool daLiPrepisuju(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
        {
            if(x1 == x2 && x3 == x4)
            {
                if (Math.Abs(y1 - y2) == 2 * Math.Abs(y3 - y4) || Math.Abs(y1 - y2) == Math.Abs(y3 - y4) / 2)
                {
                    return true;
                }
            }
            else if (x1 != x2 && x3 != x4)
            {
                if (koeficijentPravca(x1, y1, x2, y2) == koeficijentPravca(x3, y3, x4, y4) && (razmak(x1, y1, x2, y2) == 2 * razmak(x3, y3, x4, y4) || razmak(x1, y1, x2, y2) == razmak(x3, y3, x4, y4) / 2))
                {
                    return true;
                }
            }
            return false;
        }

        static double razmak(int x1, int y1, int x2, int y2)
        {
            return Math.Sqrt(Math.Pow(x1 - x2, 2) + Math.Pow(y1 - y2, 2));
        }

        static double koeficijentPravca(int x1, int y1, int x2, int y2)
        {
            return (y2 - y1) / (x2 - x1);
        }
    }
}