#include <bits/stdc++.h>
int main() {
  int n, count = 0;
  scanf("%d", &n);
  int p[3000 + 1][2];
  bool(*e)[1000 * 2 + 1];
  e = (bool(*)[1000 * 2 + 1])
      malloc((1000 * 2 + 1) * (1000 * 2 + 1) * sizeof(int));
  memset(e, (1000 * 2 + 1) * (1000 * 2 + 1) * sizeof(int), false);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &p[i][0], &p[i][1]);
    (e[(p[i][0]) + 1000][(p[i][1]) + 1000]) = true;
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (!((p[i][0] + p[j][0]) % 2) && !((p[i][1] + p[j][1]) % 2)) {
        int x = (p[i][0] + p[j][0]) / 2;
        int y = (p[i][1] + p[j][1]) / 2;
        if ((e[(x) + 1000][(y) + 1000])) {
          ++count;
        }
      }
    }
  }
  printf("%d", count);
  return 0;
}
