using System;

namespace Takmicenje3
{
    class Program
    {
        struct Tacka
        {
            public int x;
            public int y;
        }

        static int Proveri(Tacka[] tacke, Tacka a, Tacka b, int rb1, int rb2, int n)
        {
            int br = 0;
            double duzinaP = Math.Sqrt(Math.Pow(a.x - b.x, 2) + Math.Pow(a.y - b.y, 2));
            double kP;
            if ((a.y - b.y) != 0)
            {
                kP = (a.x - b.x) / (a.y - b.y);
            }
            else
            {
                kP = 0;
            }

            double duzina, k;
            for (int i = rb1 + 1; i < n; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    if (i != j && i != rb1 && j != rb2)
                    {
                        duzina = Math.Sqrt(Math.Pow(tacke[i].x - tacke[j].x, 2) + Math.Pow(tacke[i].y - tacke[j].y, 2));
                        if ((tacke[i].y - tacke[j].y) != 0)
                        {
                            k = (tacke[i].x - tacke[j].x) / (tacke[i].y - tacke[j].y);
                            if (kP == k && (duzinaP == 2 * duzina || duzina == 2 * duzinaP))
                            {
                                br++;
                            }
                        }
                        
                    }
                }
            }
            return br;
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());

            Tacka[] tacke = new Tacka[n];
            double[] k = new double[n * n];

            int b = 0;

            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split(' ');
                Tacka x = new Tacka();
                x.x = int.Parse(s[0]);
                x.y = int.Parse(s[1]);
                tacke[i] = x;
            }

            for (int i = 0; i < n; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    b += Proveri(tacke, tacke[i], tacke[j], i, j, n);
                }
            }
            Console.WriteLine(b);
        }
    }
}