#include <bits/stdc++.h>
using namespace std;
const double eps = 0.0000001;
const int maxn = 1e3 + 7;
const int mod = 1e9 + 7;
template <typename T>
inline void read(T &_x_) {
  _x_ = 0;
  bool f = false;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = !f;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    _x_ = _x_ * 10 + ch - '0';
    ch = getchar();
  }
  if (f) _x_ = -_x_;
}
int x[2005];
int y[2005];
int n;
map<pair<int, int>, int> cnt;
int main() {
  read(n);
  for (int i = 1; i <= n; i++) {
    read(x[i]);
    read(y[i]);
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (i == j) continue;
      int dx = x[i] + x[j];
      int dy = y[i] + y[j];
      cnt[make_pair(dx, dy)]++;
    }
  }
  for (auto itr = cnt.begin(); itr != cnt.end(); itr++)
    ans += 1LL * itr->second * (itr->second - 1) / 2;
  printf("%d\n", ans);
  return 0;
}
