#include <bits/stdc++.h>
using namespace std;
struct dot {
  int x;
  int y;
};
struct line {
  int dx;
  int dy;
};
bool comp(line &a, line &b) {
  if (a.dx != b.dx) {
    return a.dx < b.dx;
  } else {
    return a.dy < b.dy;
  }
}
bool compa(dot &a, dot &b) {
  if (a.y != b.y)
    return a.y < b.y;
  else
    return a.x < b.x;
}
int main() {
  int n;
  cin >> n;
  if (n < 4) {
    cout << 0;
    return 0;
  }
  vector<dot> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i].x;
    cin >> a[i].y;
  }
  sort(a.begin(), a.end(), compa);
  vector<line> b(n * (n - 1) / 2);
  int k = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      b[k].dx = a[j].x - a[i].x;
      b[k].dy = a[j].y - a[i].y;
      k++;
    }
  }
  sort(b.begin(), b.end(), comp);
  long long ans = 0;
  int curDx = b[0].dx;
  int curDy = b[0].dy;
  int curN = 1;
  for (int i = 1; i < b.size(); i++) {
    if (b[i].dx == curDx && b[i].dy == curDy) {
      curN += 1;
    } else {
      ans += curN * (curN - 1) / 2;
      curN = 1;
      curDx = b[i].dx;
      curDy = b[i].dy;
    }
  }
  ans += curN * (curN - 1) / 2;
  cout << ans / 2;
  return 0;
}
