#include <bits/stdc++.h>
using namespace std;
int p[2005][2005];
int xp[3005], yp[3005];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> xp[i] >> yp[i];
    xp[i] += 1000;
    yp[i] += 1000;
    p[xp[i]][yp[i]] = 1;
  }
  int res = 0;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      if ((abs(xp[i] - xp[j]) & 1) || (abs(yp[i] - yp[j]) & 1)) continue;
      if (p[(xp[i] + xp[j]) / 2][(yp[i] + yp[j]) / 2]) res++;
    }
  cout << res << '\n';
  return 0;
}
