#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n,ans=0,a,b,gcd,l;
    string str;
    map<pair<string,int>,int> Koeficent_duzina;
    map<pair<string,int>,int> Rezerva;
    map<pair<string,int>,int>::iterator it;
    cin>>n;
    vector<int> X(n);
    vector<int> Y(n);
    for(int i=0; i<n; i++)
    {
        cin>>X[i]>>Y[i];
    }
    for(int i=0; i<n-1; i++)
    {
        for(int j=i+1; j<n; j++)
        {
            a=(X[i]-X[j]);
            b=(Y[i]-Y[j]);
            gcd=__gcd(a,b);
            l=a*a+b*b;
            a=a/gcd;
            b=b/gcd;
            if(a<0)
            {
                b*=-1;
                a*=-1;
            }
            str= to_string(b) + "/" + to_string(a);
            Koeficent_duzina[{str,l}]++;
        }
    }
    for (it = Koeficent_duzina.begin(); it != Koeficent_duzina.end(); it++)
    {
        Rezerva[{it->first.first,it->first.second}]=it->second;
        //cout<<it->first.first<<" "<<it->first.second<<" "<<it->second<<endl;
    }
    for (it = Koeficent_duzina.begin(); it != Koeficent_duzina.end(); it++)
    {
        ans+=Koeficent_duzina[{it->first.first,it->first.second}]*Rezerva[{it->first.first,it->first.second*4}];
    }
    cout<<ans;
    return 0;
}