#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> cnt;
int n, res;
pair<int, int> p[2005];
bool sign(int a, int b) { return (a < 0) == (b < 0); }
int s[2] = {-1, 1};
pair<int, int> process(pair<int, int> a) {
  if (sign(a.first, a.second)) return {abs(a.first), abs(a.second)};
  int s = ::s[a.first > 0];
  return {a.first * s, a.second * s};
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; j++) {
      pair<int, int> dif = {p[i].first - p[j].first, p[i].second - p[j].second};
      dif = process(dif);
      res += cnt[dif];
      cnt[dif]++;
    }
  }
  cout << res / 2;
}
