using System;

class Program{
    struct Tacka{
        public double x;
        public double y;
    }
    public static int Rastojanje(Tacka A, Tacka B){
        return Math.Sqrt((A.x-B.x)*(A.x-B.x) + (A.y-B.y)*(A.y-B.y));
    }
    public static bool DaLiJeTrapez(Tacka A, Tacka B, Tacka C, Tacka D){
        if((Math.Abs(A.x - B.x) / Math.Abs(A.y - B.y) == Math.Abs(C.x - D.x) / Math.Abs(C.y - D.y)) && (Rastojanje(A,B) == 2*Rastojanje(C,D) || 2*Rastojanje(A,B) == Rastojanje(C,D))) 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]);
        }
        Array.Sort(niz, (a,b) => {
            if(a.x.CompareTo(b.x) == 0) return a.y.CompareTo(a.y);
            else return a.x.CompareTo(b.x);
        });
        if(N < 4) Console.WriteLine("0");
        int brojac = 0;
        //uzimaju se dve tacke koje predstavljaju krak, i generisu se jos dve.
        for(int i = 0; i< n-3; i++){
            for(int j = i + 1; j<n-2; j++){
                for(int k = j + 1; k<n-1; k++){
                    for(int l = k + 1; l<n; l++){
                        if(DaLiJeTrapez(niz[i], niz[j], niz[k], niz[l])) brojac++;
                    }
                }
            }
        }
        Console.WriteLine(brojac);
    }
}