#include <bits/stdc++.h>
using namespace std;
int n, ans;
vector<pair<int, int> > v;
int main() {
  cin >> n;
  for (int x, y, i = 1; i <= n; i++) {
    cin >> x >> y;
    v.push_back({x, y});
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      pair<int, int> M;
      if ((v[i].first + v[j].first) % 2 == 0 &&
          (v[i].second + v[j].second) % 2 == 0) {
        M = {(v[i].first + v[j].first) / 2, (v[i].second + v[j].second) / 2};
        if (binary_search(v.begin(), v.end(), M)) {
          ans++;
        }
      }
    }
  }
  cout << ans;
  return 0;
}
