#include <bits/stdc++.h>
bool t[2001][2001];
int main() {
  int n, x, y;
  int xy[3000][2];
  int r(0);
  std::scanf("%d", &n);
  for (int i(0); i < n; ++i) {
    std::scanf("%d%d", &xy[i][0], &xy[i][1]);
    xy[i][0] += 1000, xy[i][1] += 1000;
    t[xy[i][0]][xy[i][1]] = true;
  }
  for (int i(0); i < n; ++i) {
    for (int j(i + 1); j < n; ++j) {
      x = xy[i][0] + xy[j][0];
      y = xy[i][1] + xy[j][1];
      if (x & 1) continue;
      if (y & 1) continue;
      r += t[x / 2][y / 2];
    }
  }
  std::printf("%d\n", r);
  return 0;
}
