#include <bits/stdc++.h>
using namespace std;
bool have[2001][2001];
void solve() {
  int n;
  cin >> n;
  int x[n], y[n];
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    x[i] += 1000;
    y[i] += 1000;
    have[x[i]][y[i]] = true;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if ((x[i] + x[j]) & 1 || (y[i] + y[j]) & 1) continue;
      ans += have[(x[i] + x[j]) / 2][(y[i] + y[j]) / 2];
    }
  }
  cout << ans << "\n";
}
int32_t main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
