using System;

namespace jej
{
    class Program
    {
        static void razmeni(ref double a, ref double b)
        {
            double x = a;
            a = b;
            b = x;
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[,] a = new int[n, 2];
            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                a[i, 0] = int.Parse(s[0]);
                a[i, 1] = int.Parse(s[1]);
            }
            int nova = (n * (n - 1)) / 2;
            double[,] k = new double[nova, 3];
            int c = 0;
            int br = 0;
            for (int i = 0; i < n; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    if (a[i, 0] == a[j, 0])
                    {
                        k[c, 0] = 1f / 0;
                        k[c, 2] = a[i, 0];
                    }
                    else
                    {
                        k[c, 0] = (double)(a[i, 1] - a[j, 1]) / (a[i, 0] - a[j, 0]);
                        k[c, 2] = a[i, 1] - k[c, 0] * a[i, 0];
                    }
                    k[c, 1] = Math.Sqrt((a[i, 0] - a[j, 0]) * (a[i, 0] - a[j, 0]) + (a[i, 1] - a[j, 1]) * (a[i, 1] - a[j, 1]));
                    c++;
                }
            }
            for (int i = 0; i < nova; i++)
            {
                for (int j = i + 1; j < nova; j++)
                {
                    if (k[i, 0] > k[j, 0])
                    {
                        razmeni(ref k[i, 0], ref k[j, 0]);
                        razmeni(ref k[i, 1], ref k[j, 1]);
                        razmeni(ref k[i, 2], ref k[j, 2]);
                    }
                    else if (k[i, 0] == k[j, 0])
                    {
                        if (k[i, 2] < k[j, 2])
                        {
                            razmeni(ref k[i, 0], ref k[j, 0]);
                            razmeni(ref k[i, 1], ref k[j, 1]);
                            razmeni(ref k[i, 2], ref k[j, 2]);
                        }
                    }
                }
            }
            for (int i = 0; i < nova - 1; i++)
            {
                int j = i + 1;
                while (j < nova && k[i, 0] == k[j, 0])
                {
                    if ((k[i, 1] == 2 * k[j, 1] || k[j, 1] == 2 * k[i, 1]) && k[i, 2] != k[j, 2])
                    {
                        br++;
                    }
                    j++;
                }
            }
            Console.WriteLine(br);
        }
    }
}