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

#define ll long long
const int N = 200001;
const int inf = 1e9 + 7;
pair<double, double> a[N];
map<pair<double, double>, int> m;

void solve() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> a[i].first >> a[i].second;
    int ind = 0;
    for (int i = 1; i < n; i++) {
        for (int j = 0; j < i; j++) {
            double raz1 = a[j].first - a[i].first, raz2 = a[j].second - a[i].second;
            double y = sqrt(raz1*raz1 + raz2*raz2), x;
            if (raz2 == 0){
                x = -1;
            }
            else
                x = raz1 / raz2;
            auto it = m.find({x, y});
            if (it == m.end()) {
                m.insert({{x, y}, 1});
            }
            else {
                it -> second++;
            }
        }
    }
    int resenje = 0;
    for (auto i = m.begin(); i != m.end(); i++) {
        pair<double, double> x = i -> first;
        x.second *= 2;
        auto it = m.find(x);
        if (it == m.end())
            continue;
        resenje += i -> second * it -> second;
    }
    cout << resenje << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    return 0;
}