#include <bits/stdc++.h>
using namespace std;
using ll = unsigned long long;
using ld = long double;
const int mxn = 1e6 + 10;
const int mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<pair<ll, ll> > pt(n);
  map<pair<ll, ll>, int> f;
  for (int i = 0; i < n; i++) {
    cin >> pt[i].first >> pt[i].second;
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      pair<ll, ll> tmp =
          make_pair(pt[i].first + pt[j].first, pt[i].second + pt[j].second);
      f[tmp]++;
    }
  ll ans = 0;
  for (auto x : f) {
    ans += 1ll * x.second * (x.second - 1) / 2;
  }
  cout << ans << '\n';
  return 0;
}
