#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  set<pair<int, int>> st;
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    pair<int, int> pt;
    cin >> pt.first >> pt.second;
    st.emplace(pt);
  }
  int cnt = 0;
  for (auto it = st.begin(); it != st.end(); ++it) {
    auto it2 = it;
    ++it2;
    for (; it2 != st.end(); ++it2) {
      int x = it->first + it2->first;
      int y = it->second + it2->second;
      if (x % 2 == 0 && y % 2 == 0) {
        if (st.find({x / 2, y / 2}) != st.end()) {
          ++cnt;
        }
      }
    }
  }
  cout << cnt << '\n';
}
