using System;

namespace kvalifikacije1._3
{
    class Tacka
    {
        public int x,y;
        public Tacka(int x, int y)
        {
            this.x = x;
            this.y = y;
        }
        public double udaljenostOd(Tacka b)
        {
            return Math.Sqrt((this.x - b.x) * (this.x - b.x) + (this.y - b.y) * (this.y - b.y));
        }
        public int udaljenostPoXOsi(Tacka b)
        {
            return Math.Abs(this.x - b.x);
        }
        public int udaljenostPoYOsi(Tacka b)
        {
            return Math.Abs(this.y - b.y);
        }
    }
    class Duz
    {
        public Tacka a, b;
        public double d;
        public Duz(Tacka a,Tacka b)
        {
            this.a = a;
            this.b = b;
            this.d = this.duzina();
        }
        public double duzina()
        {
            return this.a.udaljenostOd(this.b);
        }
        public bool paralelne(Duz c)
        {
            if (this.a.udaljenostPoXOsi(this.b) * c.a.udaljenostPoYOsi(c.b) == this.a.udaljenostPoYOsi(this.b) * c.a.udaljenostPoXOsi(c.b))
            { 
                if(c.a.udaljenostPoYOsi(c.b)!= c.a.udaljenostPoXOsi(c.b)) return true;
                if (this.a.y > this.b.y)
                {
                    if (c.a.y > c.b.y)
                    {
                        if (this.a.x < this.b.x && c.a.x < c.b.x) return true;
                        if (this.a.x > this.b.x && c.a.x > c.b.x) return true;
                    }
                    else 
                    { 
                        if (this.a.x < this.b.x && c.b.x < c.a.x) return true; 
                        if (this.a.x > this.b.x && c.b.x > c.a.x) return true; 
                    }
                }
                else
                {
                    if (c.a.y > c.b.y)
                    {
                        if (this.b.x < this.a.x && c.a.x < c.b.x) return true;
                        if (this.b.x > this.a.x && c.a.x > c.b.x) return true;
                    }
                    else 
                    { 
                        if (this.b.x < this.a.x && c.b.x < c.a.x) return true;
                        if (this.b.x > this.a.x && c.b.x > c.a.x) return true;
                    }
                }
            }
            return false;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string[] str;
            Tacka[] nt = new Tacka[n];
            for(int i = 0; i < n; i++)
            {
                str = Console.ReadLine().Split();
                nt[i] = new Tacka(int.Parse(str[0]), int.Parse(str[1]));
            }
            int dnd = (n - 1) * n / 2;
            Duz[] nd = new Duz[dnd];
            int k = 0;
            for (int i=0;i<n-1;i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    nd[k] = new Duz(nt[i], nt[j]);
                    k++;
                }
            }
            k = 0;
            for(int i = 0; i < dnd-1; i++)
            {
                for(int j = i + 1; j < dnd; j++)
                {
                    if (nd[i].d == nd[j].d * 2 || nd[i].d * 2 == nd[j].d)
                        if (nd[i].paralelne(nd[j]))
                        {
                            k++;
                        }
                }
            }
            Console.WriteLine(k);
        }
    }
}