#include <bits/stdc++.h>
using namespace std;
signed main() {
  int n;
  cin >> n;
  pair<long long, long long> xy[n];
  for (int i = 0; i < n; ++i) {
    cin >> xy[i].first >> xy[i].second;
  }
  map<pair<long long, long long>, long long> cnt;
  long long ans = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      long long x = xy[i].first + xy[j].first;
      long long y = xy[i].second + xy[j].second;
      cnt[{x, y}]++;
    }
  }
  for (auto x : cnt) ans += (x.second) * (x.second - 1) / 2;
  cout << ans;
}
