#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << '\n';
  err(++it, args...);
}
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  map<pair<double, double>, int> m;
  vector<pair<double, double>> arr;
  long long ans = 0;
  for (__typeof(n) i = (0) - (0 > n); i != (n) - (0 > n);
       i += 1 - 2 * (0 > n)) {
    double x, y;
    cin >> x >> y;
    arr.push_back({x, y});
  }
  for (__typeof(n) i = (0) - (0 > n); i != (n) - (0 > n);
       i += 1 - 2 * (0 > n)) {
    for (__typeof(n) j = (i + 1) - (i + 1 > n); j != (n) - (i + 1 > n);
         j += 1 - 2 * (i + 1 > n)) {
      double x = (arr[i].first + arr[j].first) / 2,
             y = (arr[i].second + arr[j].second) / 2;
      m[{x, y}]++;
    }
  }
  for (auto x : m) {
    ans += x.second * (x.second - 1) / 2;
  }
  cout << ans << '\n';
  return 0;
}
