#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
using std::map;
using std::vector;
template <typename T>
T myabs(T t) {
  return t > 0 ? t : -t;
}
struct Point {
  int x, y;
  Point() {}
  Point(int a, int b) : x(a), y(b) {}
  Point operator+(const Point &pt) { return Point(x + pt.x, y + pt.y); }
  Point operator-(const Point &pt) { return Point(x - pt.x, y - pt.y); }
  Point abs() {
    if (x > 0)
      return *this;
    else if (x == 0)
      return Point(x, myabs(y));
    else
      return Point(-x, -y);
  }
  bool operator<(const Point &pt) const {
    return x == pt.x ? y < pt.y : x < pt.x;
  }
};
map<Point, int> vecs;
long long getCntVecAndAdd(Point vec) {
  auto iter = vecs.find(vec);
  if (iter == vecs.end()) {
    vecs.emplace(vec, 1);
    return 0;
  } else {
    ++iter->second;
    return iter->second - 1;
  }
}
int main() {
  int n;
  cin >> n;
  long long res = 0;
  vector<Point> pts;
  for (int q = 0; q < n; ++q) {
    Point pt;
    cin >> pt.x >> pt.y;
    long long add = 0;
    for (int i = 0; i < q; ++i) {
      Point vec = (pt - pts[i]).abs();
      add += getCntVecAndAdd(vec);
    }
    res += add / 2;
    pts.push_back(pt);
  }
  cout << res << endl;
  return 0;
}
