#include<bits/stdc++.h>
using namespace std;

#define endl '\n'
#define ll long long
#define NMAX (int)1e6
#define vi vector<int>
#define pii pair<int,int>
#define w(x) cout<<#x<<':'<<x<<endl;
#define PB push_back
#define juseinbolt ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);


struct duz
{
    int x1,x2,y1,y2;
    ll duzina;

    ll calcLength() const
    {
        return (1ll*(x1-x2)*(x1-x2)+1ll*(y1-y2)*(y1-y2));
    }

    static int compareK(const duz& d1, const duz& d2)
    {
        if(d1.x1==d1.x2)
        {
            if(d2.x1==d2.x2) return 0;
            else return 1;
        }
        if(d2.x1==d2.x2)
        {
            if(d1.x1==d1.x2) return 0;
            else return -1;
        }

        ll a=(d1.y2-d1.y1), d=(d2.x2-d2.x1), b=(d1.x2-d1.x1), c=(d2.y2-d2.y1);
        ll G=a*d-b*c, D=b*d;
        int zG,zD;

        if(G>0) zG=1;
        else if(G<0) zG=-1;
        else zG=0;

        if(D>0) zD=1;
        else if(D<0) zD=-1;
        else zD=0;

        return zG/zD;

        /*ll r=1ll*(d1.y2-d1.y1)*(d2.x2-d2.x1)-1ll*(d1.x2-d1.x1)*(d2.y2-d2.y1);

        if(r==0) return 0;
        if(r>0) return 1;
        if(r<0) return -1;*/
    }
    static int compareL(const duz& d1, const duz& d2)
    {
        ll r=d1.duzina-d2.duzina;
        if(r==0) return 0;
        if(r>0) return 1;
        if(r<0) return -1;
    }

    bool operator > (const duz& d) const
    {
        //int x1=this->x1,x2=this->x2,y1=this->y1,y2=this->y2;

        int r1=-compareK(*this,d);
        int r2=-compareL(*this,d);

        if(r1==1) return 1;
        if(r1==-1) return 0;

        if(r2==1) return 1;
        else return 0;
    }

    void prikazi(map<pii,char> &mapa)
    {
        cout<<mapa[pair<int,int>(x1,y1)]<<mapa[pair<int,int>(x2,y2)];
        //cout<<"("<<x1<<","<<y1<<") ("<<x2<<","<<y2<<") L:"<<duzina<<endl;
    }
};


int uporedbaZaBajnri(const duz& d1, const duz& d2)
{
    int cmp;
    cmp=duz::compareK(d1,d2);
    if(cmp==0)
    {
        if(d1.duzina*4>d2.duzina) cmp=1;
        else if(4*d1.duzina<d2.duzina) cmp=-1;
        else cmp=0;
    }
    return cmp;
}
int firstApp(vector<duz> &v, int low, int high, duz &x, int n)
{
    if (high >= low) {
        int mid = low + (high - low) / 2;

        int cmp1,cmp2;
        if(mid>0)
        {
            cmp1=uporedbaZaBajnri(x,v[mid-1]);
        }
        cmp2=uporedbaZaBajnri(x,v[mid]);

        if ((mid == 0 || cmp1>0) && cmp2==0)
            return mid;
        else if (cmp2>0)
            return firstApp(v, (mid + 1), high, x, n);
        else
            return firstApp(v, low, (mid - 1), x, n);
    }
    return -1;
}
int lastApp(vector<duz> &v, int low, int high, duz &x, int n)
{
    if (high >= low) {
        int mid = low + (high - low) / 2;

        int cmp1,cmp2;
        if(mid<n-1)
        {
            cmp1=uporedbaZaBajnri(x,v[mid+1]);
        }
        cmp2=uporedbaZaBajnri(x,v[mid]);

        if ((mid == n - 1 || cmp1<0) && cmp2==0)
            return mid;
        else if (cmp2<0)
            return lastApp(v, low, (mid - 1), x, n);
        else
            return lastApp(v, (mid + 1), high, x, n);
    }
    return -1;
}

int main()
{
    juseinbolt;

    int n; cin>>n;
    vector<duz> duzi(n*(n-1)/2);
    vector<pii> tacke(n);
    map<pii,char> mapa;
    for(int i=0; i<n; ++i)
    {
        cin>>tacke[i].first>>tacke[i].second;
        mapa[pair<int,int>(tacke[i].first,tacke[i].second)]='A'+i;
    }

    int dcnt=0;
    for(int i=0; i<n; ++i)
    {
        for(int j=i+1; j<n; ++j)
        {
            duzi[dcnt].x1=tacke[i].first;
            duzi[dcnt].x2=tacke[j].first;
            duzi[dcnt].y1=tacke[i].second;
            duzi[dcnt].y2=tacke[j].second;
            duzi[dcnt].duzina=duzi[dcnt].calcLength();
            dcnt++;
        }
    }

    sort(begin(duzi),end(duzi), greater<duz>());

    for(int i=0; i<duzi.size(); ++i)
    {
        //cout<<duzi[i].x1<<" "<<duzi[i].y1<<" ; "<<duzi[i].x2<<" "<<duzi[i].y2<<endl;
        //cout<<mapa[pair<int,int>(duzi[i].x1,duzi[i].y1)]<<mapa[pair<int,int>(duzi[i].x2,duzi[i].y2)]<<endl;
    }

    n=duzi.size();
    ll ans=0;
    for(int i=0; i<n; ++i)
    {
        duz trDuz=duzi[i];
        //if(trDuz.duzina!=4) continue;
        int f=firstApp(duzi,0,n-1,duzi[i],n), l=lastApp(duzi,0,n-1,duzi[i],n);
        //cout<<f<<" "<<l<<" "<<trDuz.duzina<<endl;
        if(f==-1 || l==-1) continue;

        ans+=(l-f+1);

        /*trDuz.prikazi(mapa);
        cout<<":";
        for(int j=f; j<=l; ++j) {duzi[j].prikazi(mapa); cout<<", ";}
        cout<<endl<<"----------------"<<endl;*/
    }
    cout<<ans;

    /*map<pii,char> mapa;
    mapa[pair<int,int>(2,2)]='A';
    mapa[pair<int,int>(1,1)]='B';
    mapa[pair<int,int>(1,-1)]='C';
    mapa[pair<int,int>(2,-2)]='D';
    mapa[pair<int,int>(-2,-2)]='E';
    mapa[pair<int,int>(-1,-1)]='F';
    for(int i=0; i<duzi.size(); ++i)
    {
        //cout<<duzi[i].x1<<" "<<duzi[i].y1<<" ; "<<duzi[i].x2<<" "<<duzi[i].y2<<endl;
        cout<<mapa[pair<int,int>(duzi[i].x1,duzi[i].y1)]<<mapa[pair<int,int>(duzi[i].x2,duzi[i].y2)]<<endl;
    }*/
    return 0;
}