#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 6;
long long x[N], y[N];
int main() {
  int n;
  cin >> n;
  vector<pair<int, int>> q;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    for (int j = 0; j < i; ++j) {
      long long tx = (x[i] + x[j]);
      long long ty = (y[i] + y[j]);
      q.push_back({tx, ty});
    }
  }
  sort(q.begin(), q.end());
  long long ans = 0;
  for (int i = 0; i < q.size();) {
    int j = i;
    while (j < q.size() && q[i] == q[j]) ++j;
    long long l = j - i;
    ans += l * (l - 1) / 2;
    i = j;
  }
  cout << ans << endl;
  return 0;
}
