#include <bits/stdc++.h>
using namespace std;
const int N = 2000 + 10;
int n;
struct Point {
  int x, y;
  Point(int x = 0, int y = 0) : x(x), y(y) {}
  void input() { cin >> x >> y; }
  bool operator<(const Point& rhs) const {
    return x < rhs.x || (x == rhs.x && y < rhs.y);
  }
} point[N];
Point operator-(Point A, Point B) { return Point(A.x - B.x, A.y - B.y); }
bool operator==(const Point& a, const Point& b) {
  return a.x - b.x == 0 && a.y - b.y == 0;
}
vector<Point> S;
long long solve() {
  if (n < 4) return 0;
  sort(point, point + n);
  S.clear();
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      S.push_back(point[j] - point[i]);
    }
  }
  sort(S.begin(), S.end());
  int siz = S.size();
  long long ans = 0, tol = 1;
  for (int i = 1; i < siz; ++i) {
    if (S[i] == S[i - 1])
      tol++;
    else {
      ans += tol * (tol - 1) / 2;
      tol = 1;
    }
  }
  ans += tol * (tol - 1) / 2;
  return ans / 2;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) point[i].input();
  cout << solve() << endl;
  return 0;
}
