#include <bits/stdc++.h>
using namespace std;
pair<int, int> A[2010];
int main() {
  int n, i, j;
  scanf("%d", &n);
  map<pair<int, int>, int> ma;
  for (i = 0; i < n; i++) {
    scanf("%d%d", &A[i].first, &A[i].second);
  }
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++) {
      ma[make_pair(A[i].first + A[j].first, A[i].second + A[j].second)]++;
    }
  long long ans = 0;
  map<pair<int, int>, int>::iterator it;
  it = ma.begin();
  while (it != ma.end()) {
    int a = it->second;
    ans += (long long)(a * (a - 1)) / 2;
    it++;
  }
  printf("%lld\n", ans);
  return 0;
}
