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