#include <bits/stdc++.h>
struct p {
  int x;
  int y;
} a[3005];
int vis[6005][6005] = {0};
int main() {
  int n;
  int i, j;
  int ans = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &a[i].x, &a[i].y);
    vis[a[i].x + 3000][a[i].y + 3000] = 1;
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      if ((a[i].x + a[j].x) % 2 || (a[i].y + a[j].y) % 2) continue;
      int x = (a[i].x + a[j].x) / 2;
      int y = (a[i].y + a[j].y) / 2;
      if (vis[x + 3000][y + 3000]) ans++;
    }
  }
  printf("%d", ans);
}
