#include <bits/stdc++.h>
using namespace std;
int n;
map<pair<int, int>, vector<pair<int, int> > > mp;
long long res;
pair<int, int> a[2010];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++)
      mp[make_pair(a[j].first - a[i].first, a[j].second - a[i].second)]
          .push_back(make_pair(i, j));
  }
  for (map<pair<int, int>, vector<pair<int, int> > >::iterator it = mp.begin();
       it != mp.end(); it++) {
    int x = it->second.size();
    res += x * (x - 1) / 2;
  }
  cout << res / 2;
  return 0;
}
