using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.SymbolStore;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Net.WebSockets;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Schema;
using System.Numerics;
//using System.Data;
//using System.Drawing;

namespace ConsoleApp3
{
    class Program
    {
        class Prava
        {
            bool delj_nulom = false;
            double k = double.MinValue;
            double duzina;
            public bool Delj_nulom
            {
                get { return delj_nulom; }
                private set {; }
            }
            public double K
            {
                get { return k; }
                private set {; }
            }
            public double Duzina
            {
                get { return duzina; }
                private set {; }
            }
            public Prava(double x1, double y1, double x2, double y2)
            {
                duzina = Math.Sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
                if (x2 - x1 == 0)
                    delj_nulom = true;
                else
                {
                    k = (y2 - y1) / (x2 - x1);
                }
            }
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            List<Tuple<long, long>> a = new List<Tuple<long, long>>();
            for (int i = 0; i < n; i++)
            {
                var s = Console.ReadLine().Split();
                a.Add(Tuple.Create(long.Parse(s[0]), long.Parse(s[1])));
            }
            Dictionary<double, SortedDictionary<double, int>> d = new Dictionary<double, SortedDictionary<double, int>>();
            for (int i = 0; i < n - 1; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    long x1 = a[i].Item1;
                    long x2 = a[j].Item1;
                    long y1 = a[i].Item2;
                    long y2 = a[j].Item2;
                    Prava p = new Prava(x1, y1, x2, y2);
                    if (!d.ContainsKey(p.K))
                        d[p.K] = new SortedDictionary<double, int>();
                    if (!d[p.K].ContainsKey(p.Duzina))
                        d[p.K][p.Duzina] = 0;
                    d[p.K][p.Duzina]++;
                }
            }
            long br = 0;
            foreach (var x in d)
            {
                SortedDictionary<double, int> l1 = x.Value;
                foreach (var y in l1)
                {
                    if (l1.ContainsKey(2 * y.Key) && y.Key!=0)
                        br += y.Value * l1[2 * y.Key];
                }
            }
            Console.WriteLine(br);

        }
    }
}