#include <bits/stdc++.h>
using namespace std;
const int maxn = 2 * 1000 + 10;
vector<pair<int, int> > vec;
int n, x[maxn], y[maxn], X, Y;
long long ans, sar;
int ABS(int x) {
  if (x < 0) return -x;
  return x;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (j == i) continue;
      X = x[i] - x[j];
      Y = y[i] - y[j];
      vec.push_back(make_pair(X, Y));
    }
  }
  sort(vec.begin(), vec.end());
  for (long long i = 1; i < ((int(vec.size()))); i++) {
    if (vec[i] != vec[i - 1]) {
      ans += (i - sar) * (i - sar - 1) / 2;
      sar = i;
    }
  }
  ans += (long long)(((int(vec.size()))) - sar) *
         (((int(vec.size()))) - sar - 1) / 2;
  cout << ans / 4;
  return 0;
}
