#include <bits/stdc++.h>
using namespace std;
int a[2001][2001] = {0};
int main() {
  int n, i, c = 0, j, x, y;
  cin >> n;
  double b[n][2], e, f;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    b[i][0] = (double)x;
    b[i][1] = (double)y;
    a[x + 1000][y + 1000] = 1;
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      e = (b[i][0] + b[j][0]) / 2;
      f = (b[i][1] + b[j][1]) / 2;
      if ((floor(e) == e) && (floor(f) == f))
        if (a[(int)e + 1000][(int)f + 1000] == 1) c++;
    }
  }
  cout << c;
  return 0;
}
