#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.first != b.first || a.second != b.second) return false;
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > points(n);
  for (int i = 0; i < n; i++) cin >> points[i].first >> points[i].second;
  sort(points.begin(), points.end());
  int c = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int sumX = points[i].first + points[j].first;
      int sumY = points[i].second + points[j].second;
      if ((sumX % 2 == 0) && (sumY % 2 == 0)) {
        pair<int, int> p = make_pair(sumX / 2, sumY / 2);
        if (binary_search(points.begin(), points.end(), p)) {
          c++;
        }
      }
    }
  }
  cout << c << endl;
  return 0;
}
