#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  map<pair<double, double>, int> mp;
  map<pair<double, double>, int>::iterator itr;
  int n, i, j;
  long long ans = 0;
  cin >> n;
  long long a[n], b[n];
  for (i = 0; i < n; i++) cin >> a[i] >> b[i];
  for (i = 0; i < n - 1; i++)
    for (j = i + 1; j < n; j++)
      mp[make_pair(((double)a[i] + (double)a[j]) / 2.0,
                   ((double)b[i] + (double)b[j]) / 2.0)]++;
  for (itr = mp.begin(); itr != mp.end(); itr++) {
    i = itr->second;
    ans += (i * (i - 1)) / 2;
  }
  cout << ans << endl;
  return 0;
}
