#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  set<pair<int, int> > s;
  set<pair<int, int> >::iterator it;
  pair<int, int> p[3045];
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> p[i].first >> p[i].second;
    s.insert(make_pair(p[i].first, p[i].second));
  }
  long long ans = 0;
  for (i = 1; i <= n; i++) {
    for (j = i + 1; j <= n; j++) {
      if ((p[i].first + p[j].first) % 2 == 0 &&
          (p[i].second + p[j].second) % 2 == 0) {
        it = s.find(make_pair((p[i].first + p[j].first) / 2,
                              (p[i].second + p[j].second) / 2));
        if (*it == make_pair((p[i].first + p[j].first) / 2,
                             (p[i].second + p[j].second) / 2)) {
          ans++;
        }
      }
    }
  }
  cout << ans;
}
