#include <iostream>
#include <vector>
#include <math.h>

using namespace std;


int main(){

    int N, xtr, ytr, brojac=0, brojac2=0;
    cin>>N;

    vector <int> xkoordinate;
    vector <int> ykoordinate;


    for(int i = 0; i<N; i++){
        cin>>xtr>>ytr;
        ykoordinate.push_back(ytr);
        xkoordinate.push_back(xtr);
    }
    
    for(int u=0; u<N; u++){
        for(int j=u+1; j<N; j++){

            float s = (ykoordinate[j]-ykoordinate[u])/(float)(xkoordinate[j]-xkoordinate[u]);
            float duzina;
            vector <float> skomb{};
            vector <float> duzine{};
            float trazena;
            skomb.push_back(s);

            if(xkoordinate[u]==xkoordinate[j]){
                duzina = abs(ykoordinate[j]-ykoordinate[u]);
            }else if(ykoordinate[u]==ykoordinate[j]){
                duzina = abs(xkoordinate[j]-xkoordinate[u]);
            }else
                duzina = sqrt(abs(ykoordinate[j]-ykoordinate[u])*abs(ykoordinate[j]-ykoordinate[u])+ 
                         abs(xkoordinate[u]-xkoordinate[j])*abs(xkoordinate[u]-xkoordinate[j]));

            duzine.push_back(duzina);

            for(int g=0; g<skomb.size(); g++){
                trazena = skomb[g];
                for(int n=0; n<skomb.size(); n++){
                    if(skomb[n]==trazena){
                        brojac2++;
                    }
                    if(brojac2==2){
                        if(duzine[n]=2*duzine[g] || duzine[g]==duzine[n]*2){
                            brojac++;
                        }
                    }
                }

            }


        }

    }

    cout<<brojac;
    return 0;
}