#include <bits/stdc++.h>
using namespace std;
int n, ans;
pair<int, int> A[2048];
map<pair<int, int>, set<pair<pair<int, int>, pair<int, int>>>> centrals_map;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i].first >> A[i].second;
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int x1 = A[i].first, y1 = A[i].second;
      int x2 = A[j].first, y2 = A[j].second;
      int xc = x1 + x2, yc = y1 + y2;
      centrals_map[{(xc), (yc)}].insert({min(A[i], A[j]), max(A[i], A[j])});
    }
  }
  for (auto it = centrals_map.cbegin(); it != centrals_map.cend(); ++it) {
    int sz = it->second.size();
    ans += sz * (sz - 1) / 2;
  }
  cout << ans << endl;
}
