#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int>> a;
  int x, y;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    a.push_back(make_pair(x, y));
  }
  sort(a.begin(), a.end());
  int x1, y1, count = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      x1 = (a[i].first + a[j].first) / 2;
      y1 = (a[i].second + a[j].second) / 2;
      if (a[i].first + a[j].first != 2 * x1) continue;
      if (a[i].second + a[j].second != 2 * y1) continue;
      if (binary_search(a.begin(), a.end(), make_pair(x1, y1))) count++;
    }
  }
  cout << count;
  return 0;
}
