using System;

namespace nesusedni
{
    class Program
    {
        static void Main(string[] args)
        {
            long n = long.Parse(Console.ReadLine());
            long[] nizx = new long[n*2];
            long[] nizy = new long[n*2];
            double [] niz = new double[100000000];
            for(int i = 0; i < n; i++)
            {
                string[] unos = Console.ReadLine().Split();
                long x = long.Parse(unos[0]);
                long y = long.Parse(unos[1]);
                nizx[i] = x;
                nizy[i] = y;
            }
            int l = 0;
            int d = 0;
            int br = 0;
            while (l < n) 
            {
                d = l + 1;
                while (d < n)
                {
                    long pom1 = Math.Abs(nizx[l] - nizx[d]);
                    long pom2 = Math.Abs(nizy[l] - nizy[d]);
                    if ((pom1 == 0) || (pom2 == 0))
                    {
                        niz[br] += pom1 + pom2;
                        br++;
                    }
                    else
                    {
                        niz[br] = Math.Sqrt(Math.Pow(pom1, 2) + Math.Pow(pom2, 2));
                        br++;
                    }
                    d++;
                }
                l++;
            }
            int p = 0;
            for(int j = 0; j < br-1; j++)
            {
                for(int c = j+1; c < br; c++)
                {
                    if (niz[j] / 2 == niz[c])
                    {
                        p++;
                    }
                }
            }
            Console.WriteLine(p); 
        }
    }
}