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

namespace Prepisivaci
{
    class Program
    {
        struct Tacka
        {
            public int x;
            public int y;
        }
        struct Duz
        {
            public double r;
            public double k;
            public bool l;
        }
        static double Rastojanje(Tacka a, Tacka b)
        {
            return Math.Sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
        }
        static double K(Tacka a, Tacka b)
        {
            if (a.x == b.x || a.y == b.y)
                return 0;
            return (double)(a.y - b.y) / (double)(a.x - b.x);
        }
        static bool L(Tacka a, Tacka b)
        {
            if (a.x == b.x)
                return false;
            return true;
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            Tacka[] t = new Tacka[n];
            Duz[] d = new Duz[n * (n - 1) / 2];
            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                t[i].x = int.Parse(s[0]);
                t[i].y = int.Parse(s[1]);
            }
            int b = 0;
            for (int i = 0; i < n - 1; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    d[b].k = K(t[i], t[j]);
                    d[b].r = Rastojanje(t[i], t[j]);
                    d[b].l = L(t[i], t[j]);
                    b++;
                }
            }
            int q = 0;
            for (int i = 0; i < b - 1; i++)
            {
                for (int j = i + 1; j < b; j++)
                {
                    if (d[i].k == d[j].k && (d[i].r * 2 == d[j].r || d[j].r * 2 == d[i].r) && d[i].l == d[j].l)
                    {
                        q++;
                    }
                }
            }
            Console.WriteLine(q);
        }
    }
}