#include <bits/stdc++.h>
struct P {
  long long int x;
  long long int y;
};
struct V {
  long long int x;
  long long int y;
};
V makeV(P const &a, P const &b) { return V{b.x + a.x, b.y + a.y}; }
bool isEqual(V const &a, V const &b) { return a.x == b.x && a.y == b.y; }
int main() {
  unsigned long long int c;
  long long int x, y;
  std::cin >> c;
  std::vector<P> points;
  std::vector<V> vs;
  if (c < 4) {
    std::cout << 0;
    return 0;
  }
  for (unsigned long long int i = 0; i < c; i++) {
    std::cin >> x >> y;
    points.push_back(P{x, y});
  }
  for (unsigned long long int i = 0; i < points.size(); i++) {
    for (unsigned long long int j = i + 1; j < points.size(); j++) {
      V v = makeV(points[i], points[j]);
      vs.push_back(v);
    }
  }
  std::sort(vs.begin(), vs.end(), [](V const &a, V const &b) {
    if (a.x == b.x) return a.y < b.y;
    return a.x < b.x;
  });
  long long int total = 0;
  long long int count = 1;
  for (unsigned long long int i = 3; i < vs.size(); i++) {
    if (isEqual(vs[i], vs[i - 1])) {
      count++;
    } else {
      total += count * (count - 1) / 2;
      count = 1;
    }
  }
  std::cout << total;
}
