#include <bits/stdc++.h>
using namespace std;
void __dbg() { cout << endl; }
template <typename Arg, typename... Args>
void __dbg(Arg A, Args... B) {
  cout << ' ' << A;
  __dbg(B...);
}
const int inf = INT_MAX;
const int ninf = INT_MIN;
const int mod = 1e9 + 7;
const int maxN = 1e6 + 2;
int main() {
  int n;
  scanf("%d", &n);
  map<pair<int, int>, int> ma;
  vector<int> x(n), y(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
    scanf("%d", &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];
      ma[{cx, cy}]++;
    }
  }
  long long ans = 0;
  for (auto it : ma) {
    ans += it.second * 1LL * (it.second - 1) / 2;
  }
  printf("%lld\n", ans);
  return 0;
}
