#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  pair<int, int> a[3005];
  map<pair<int, int>, bool> h;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
    h[a[i]] = true;
  }
  int res = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if ((a[i].first + a[j].first) % 2 != 0 ||
          (a[i].second + a[j].second) % 2 != 0)
        continue;
      if (h.find(make_pair((a[i].first + a[j].first) / 2,
                           (a[i].second + a[j].second) / 2)) != h.end())
        res++;
    }
  }
  cout << res << endl;
  return 0;
}
