using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Prepisivaci
{
    class Program
    {

        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            double[,] a = new double[n, 2];
            int brojac = 0;
            double[] k = new double[n * (n - 1) / 2];
            double[] d = new double[n * (n - 1) / 2];
            for (int i = 0; i < n; i++)
            {
                string[] line = Console.ReadLine().Split();
                for (int j = 0; j < 2; j++)
                {
                    a[i, j] = int.Parse(line[j]);
                }
            }
            int p = 0;
            for (int i = 0; i < n; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    if (a[i, 1] - a[j, 1] == 0) k[p] = 123457;
                    else k[p] = (a[i, 0] - a[j, 0]) / (a[i, 1] - a[j, 1]);
                    d[p] = 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]));
                    p++;
                }
            }
            for (int i = 0; i < p; i++)
            {
                for (int j = i + 1; j < p; j++)
                {
                    if (k[i] == k[j] && (d[i] == 2 * d[j] || d[j] == 2 * d[i])) brojac++;
                }
            }
            Console.WriteLine(brojac);
        }
    }
}