#include <bits/stdc++.h>
using namespace std;
queue<pair<long long, long long> > q;
stack<pair<long long, long long> > s;
map<pair<double, double>, int> memory;
map<pair<double, double>, int>::iterator itr;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  int x[2009], y[2009];
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (i == j) continue;
      double midx = (x[i] + x[j]) / 2.0;
      double midy = (y[i] + y[j]) / 2.0;
      memory[{midx, midy}]++;
    }
  }
  long long ans = 0;
  for (itr = memory.begin(); itr != memory.end(); itr++) {
    int cnt = itr->second;
    ans += (cnt * (cnt - 1)) / 2;
  }
  cout << ans << "\n";
}
