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

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    int n; cin >> n;
    vector<int> x(n), y(n);
    map<pair<int,int>,int> c;
    for (int i = 0; i < n; i++) {
        cin >> x[i] >> y[i];
        for (int j = 0; j < i; j++) {
            int dx = a - c, dy = b - d;
            dy = (a > c ? dy : (a < c ? -dy : abs(dy)));
            c[{abs(dx), dy}]++;
        }
    }
    long long r = 0;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < i; j++) {
            int dx = a - c, dy = b - d;
            dy = (a > c ? dy : (a < c ? -dy : abs(dy)));
            r += c[{2 * abs(dx), 2 * dy}]++;
        }
    }
    cout << r << endl;
}