#include <bits/stdc++.h>
using namespace std;
const int mx = 3e3 + 10, inf = 1e9 + 10;
int x[mx], y[mx];
bool book[mx][mx];
int main() {
  int n;
  long long ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    x[i] += 1000, y[i] += 1000;
    book[x[i]][y[i]] = 1;
  }
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      int xx = x[i] + x[j], yy = y[i] + y[j];
      if (xx % 2 || yy % 2) continue;
      if (book[xx / 2][yy / 2]) ans++;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
