#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<pair<int, int>> pts(n);
  set<pair<int, int>> ms;
  for (int i = 0; i < n; i++) {
    cin >> pts[i].first >> pts[i].second;
    ms.insert({pts[i].first * 2, pts[i].second * 2});
  }
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      pair<int, int> p;
      p.first = pts[i].first + pts[j].first;
      p.second = pts[i].second + pts[j].second;
      if (ms.find(p) != ms.end()) {
        ans++;
      }
    }
  }
  cout << ans / 2 << "\n";
}
