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

map<double, multiset<double>> mp;

const int N = 1505;

double X[N];
double Y[N];

int main()
{
    int n;
    cin >> n;
    for(int i = 0; i < n; ++i){
        cin >> X[i] >> Y[i];
    }

    for(int i = 0; i < n; ++i){
        for(int j = i + 1; j < n; ++j){
            double k = (X[i] - X[j] == 0 ? DBL_MAX : (Y[i] - Y[j]) / (X[i] - X[j]));
            double dist = sqrt((X[i] - X[j]) * (X[i] - X[j]) + (Y[i] - Y[j]) * (Y[i] - Y[j]));
            mp[k].insert(dist);
        }
    }

    int res = 0;
    for(auto kv : mp){
        auto st = kv.second; //kinda slowish
        while(!st.empty()){
            double top = *(st.begin());
            int amountMe = distance(st.begin(), st.upper_bound(top));
            int amountDouble = distance(st.lower_bound(2 * top), st.upper_bound(2 * top)); //linear
            res += amountMe * amountDouble;
            st.erase(top);
        }
    }

    cout << res << "\n";
    return 0;
}