using System;

class Program
{
    struct Tacka
    {
        public double x;
        public double y;
    }
    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 bool DaLiJeTrapez(Tacka A, Tacka B, Tacka C, Tacka D)
    {
        if ((Rastojanje(A, B) == 2 * Rastojanje(C, D)) && (Math.Abs(A.x - B.x) / Math.Abs(A.y - B.y) == Math.Abs(C.x - D.x) / Math.Abs(C.y - D.y))) return true;
        return false;
    }
    public static void Main()
    {
        int N = int.Parse(Console.ReadLine());
        Tacka[] niz = new Tacka[N];
        for (int i = 0; i < N; i++)
        {
            string[] red = Console.ReadLine().Split();
            niz[i] = new Tacka();
            niz[i].x = double.Parse(red[0]);
            niz[i].y = double.Parse(red[1]);
        }
        if (N < 4) Console.WriteLine("0");
        else
        {
            int brojac = 0;
            for (int i = 0; i < N; i++)
            {
                for(int j = 0; j<N; j++)
                {
                    if (j == i) continue;
                    for(int k = 0; k<N; k++)
                    {
                        if (k == i || k == j) continue;
                        for(int l = 0; l<N; l++)
                        {
                            if (l == k || l == i || l == j) continue;
                            if (DaLiJeTrapez(niz[i], niz[j], niz[k], niz[l])) brojac++;
                        }
                    }
                }
            }
            Console.WriteLine(brojac/4);
        }
        
    }
}