#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> cnt;
int x[2005], y[2005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &x[i], &y[i]);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      int cx = (x[i] + x[j]);
      int cy = (y[i] + y[j]);
      cnt[{cx, cy}]++;
    }
  long long res = 0;
  for (auto par : cnt) res += 1LL * (par.second * (par.second - 1)) / 2;
  cout << res << endl;
  return 0;
}
