#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 10;
pair<int, int> a[N];
int n, ans;
bool cmp(pair<int, int> x, pair<int, int> y) {
  if (fabs(atan2(x.second, x.first) - atan2(y.second, y.first)) > 1e-9)
    return atan2(x.second, x.first) < atan2(y.second, y.first);
  return x < y;
}
map<pair<int, int>, int> mp;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &a[i].first, &a[i].second);
  sort(a, a + n, cmp);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      pair<int, int> tmp =
          make_pair(a[j].first - a[i].first, a[j].second - a[i].second);
      if (tmp.first < 0) {
        tmp.first = -tmp.first;
        tmp.second = -tmp.second;
      }
      mp[tmp]++;
    }
  for (auto it = mp.begin(); it != mp.end(); it++) {
    ans += ((it->second - 1) * it->second * 1ll) / 2;
  }
  cout << ans / 2 << endl;
}
