#include <bits/stdc++.h>
using namespace std;
clock_t time_p = clock();
void time() {
  time_p = clock() - time_p;
  cerr << "Time elapsed : " << (double)(time_p) / CLOCKS_PER_SEC << '\n';
}
map<pair<int, int>, int> m;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) m[{x[i] + x[j], y[i] + y[j]}]++;
  int res = 0;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      res += m[{x[i] + x[j], y[i] + y[j]}] - 1;
    }
  cout << res / 2 << '\n';
  time();
  return 0;
}
