#include <bits/stdc++.h>
using namespace std;
int x[2005], y[2005];
struct node {
  int dx, dy;
} d[4000005];
bool cmp(node a, node b) { return a.dx < b.dx | (a.dx == b.dx && a.dy < b.dy); }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (x[j] - x[i] > 0 || (x[j] - x[i] == 0 && y[j] - y[i] > 0)) {
        d[++cnt].dx = x[j] - x[i];
        d[cnt].dy = y[j] - y[i];
      }
    }
  }
  sort(d + 1, d + cnt + 1, cmp);
  long long ans = 0;
  int c = 1;
  for (int i = 1; i <= cnt; i++) {
    if (d[i].dx == d[i - 1].dx && d[i].dy == d[i - 1].dy)
      c++;
    else {
      ans += c * (c - 1) / 2;
      c = 1;
    }
  }
  printf("%lld", ans / 2);
  return 0;
}
