#include <bits/stdc++.h>
using namespace std;
int x[2010], y[2010];
long long nc2(long long n) { return (n * n - n) / 2LL; }
int main() {
  int T, n, caseNo = 0;
  map<pair<int, int>, long long> cnt;
  scanf("%d", &n);
  for (int i = 0; i <= n - 1; i++) {
    scanf("%d %d", &x[i], &y[i]);
    x[i] *= 2;
    y[i] *= 2;
  }
  for (int i = 0; i <= n - 1; i++) {
    for (int j = i + 1; j <= n - 1; j++) {
      int midX = x[i] + x[j];
      int midY = y[i] + y[j];
      cnt[{midX, midY}]++;
    }
  }
  long long ans = 0LL;
  map<pair<int, int>, long long>::iterator it;
  for (it = cnt.begin(); it != cnt.end(); it++) {
    long long Cnt = it->second;
    ans += nc2(Cnt);
  }
  printf("%lld\n", ans);
  cnt.clear();
  return 0;
}
