#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, e = 0;
  cin >> n;
  vector<pair<double, double> > v(n + 1);
  for (long long int i = 1; i <= n; ++i) {
    long long int w, x;
    cin >> w >> x;
    v[i].first = w + 1000;
    v[i].second = x + 1000;
  }
  sort(v.begin(), v.end());
  for (long long int i = 1; i <= n; ++i) {
    for (long long int j = i + 1; j <= n; ++j) {
      double y = (v[i].first + v[j].first) / 2.0;
      double q = (v[i].second + v[j].second) / 2.0;
      if (binary_search(v.begin(), v.end(), pair<double, double>(y, q))) {
        ++e;
      }
    }
  }
  cout << e << endl;
}
