#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<pair<int, int> > st;
  while (n--) {
    int a, b;
    cin >> a >> b;
    st.insert({a, b});
  }
  set<pair<int, int> >::iterator it1, it2;
  it1 = st.begin();
  int c = 0;
  while (it1 != st.end()) {
    it2 = it1;
    it2++;
    while (it2 != st.end()) {
      int x1 = (*it1).first;
      int x2 = (*it2).first;
      int y1 = (*it1).second;
      int y2 = (*it2).second;
      int x = (x1 + x2);
      int y = (y1 + y2);
      if (st.find({x / 2, y / 2}) != st.end() && (x % 2 == 0) && (y % 2 == 0)) {
        c++;
      }
      it2++;
    }
    it1++;
  }
  cout << c;
  return 0;
}
