#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 23;
const int MOD = 1e9 + 7;
const int SZ = 2e3 + 10;
pair<int, int> arr[SZ];
map<pair<int, int>, int> m;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i].first >> arr[i].second;
    for (int j = 0; j < i; ++j) {
      pair<int, int> p[] = {arr[i], arr[j]};
      sort(p, p + 2);
      int xdist = p[1].first - p[0].first;
      int ydist = p[1].second - p[0].second;
      ++m[{xdist, ydist}];
    }
  }
  int ans = 0;
  for (auto& it : m) {
    ans += it.second * (it.second - 1) / 2;
  }
  ans /= 2;
  cout << ans << "\n";
  return 0;
}
