using System;

namespace treci_zadatak_kvalifikacije_1
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] x = new int[n];
            int[] y = new int[n];
            int br = 0;
            double[] k = new double[n * n];
            double[] d = new double[n * n];
            for (int i = 0; i < n; i++) 
            {
                string[] s = Console.ReadLine().Split(' ');
                x[i] = int.Parse(s[0]); y[i] = int.Parse(s[1]);
            }
            int brk = 0;
            for (int i = 0; i < n; i++) 
            {
                for(int j=i+1; j<n; j++)
                {
                    double pom;
                    if (x[j] - x[i] == 0) pom = 0;
                    else pom = (y[j] - y[i]) / (x[j] - x[i]);
                    double dpom = Math.Sqrt((y[j] - y[i]) * (y[j] - y[i]) + (x[j] - x[i]) * (x[j] - x[i]));
                    int pom2 = Array.IndexOf(k, pom);
                    if (pom2 != -1) 
                    {
                        if (dpom / d[pom2] == 2 || d[pom2] / dpom == 2) br++;
                    }
                    k[brk] = pom ;
                    d[brk] = dpom;
                    brk++;
                }
            }
            if (n < 4)
            { br = 0; }
            Console.WriteLine(br);
        }
    }
}