#include <bits/stdc++.h>
using namespace std;
const int N = 2020;
int n;
int x[N], y[N];
bool read() {
  if (!(cin >> n)) return false;
  for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  return true;
}
inline long C2(long n) { return n * (n - 1) / 2; }
int main() {
  map<pair<int, int>, int> cnt;
  read();
  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 ans = 0;
  for (const auto& p : cnt) ans += C2(p.second);
  cout << ans << endl;
  return 0;
}
