#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<double, double> > V;
  set<pair<double, double> > S;
  for (int i = 0; i < n; i++) {
    double x, y;
    cin >> x >> y;
    V.push_back(make_pair(x, y));
    S.insert(make_pair(x, y));
  }
  int f = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (S.count(make_pair((V[i].first + V[j].first) / 2,
                            (V[i].second + V[j].second) / 2))) {
        f++;
      }
    }
  }
  cout << f;
  return 0;
}
