#include <bits/stdc++.h>
using namespace std;
int main() {
  map<pair<int, int>, int> dat;
  vector<pair<int, int> > p;
  int np;
  cin >> np;
  int res = 0;
  while (np--) {
    int x, y;
    cin >> x >> y;
    p.push_back(make_pair(x, y));
    dat[make_pair(x, y)] = 1;
  }
  int sz = p.size();
  for (int i = 0; i < sz; i++)
    for (int j = i + 1; j < sz; j++) {
      double x = p[i].first + p[j].first;
      double y = p[i].second + p[j].second;
      x /= 2.0;
      y /= 2.0;
      pair<int, int> tmp;
      if (fabs(x - int(x)) < 1e-9 && fabs(y - int(y)) < 1e-9) {
        tmp = make_pair(int(x), int(y));
        if (dat.find(tmp) != dat.end()) res++;
      }
    }
  cout << res << endl;
}
