#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  pair<double, double> p[n];
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  sort(p, p + n);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (binary_search(p, p + n,
                        make_pair((p[i].first + p[j].first) / 2,
                                  (p[i].second + p[j].second) / 2)))
        ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
