#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> x(n);
  vector<int> y(n);
  vector<vector<bool>> t(2001, vector<bool>(2001));
  for (int i = 0; i < n; i++) {
    int xp, yp;
    cin >> xp;
    cin >> yp;
    xp += 1000;
    yp += 1000;
    t[xp][yp] = true;
    x[i] = xp;
    y[i] = yp;
  }
  int cont = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      bool sirve = true;
      int fst = x[i] + x[j];
      if (fst % 2 != 0) {
        sirve = false;
      } else {
        fst /= 2;
      }
      int snd = y[i] + y[j];
      if (snd % 2 != 0) {
        sirve = false;
      } else {
        snd /= 2;
      }
      if (sirve && t[fst][snd]) {
        cont++;
      }
    }
  }
  cout << cont;
  return 0;
}
