#include <bits/stdc++.h>
using namespace std;
double EPS = 1e-9;
double pi = acos(-1.0);
map<pair<double, double>, int> m;
map<double, int> especial;
set<pair<double, double> > s;
void proo(complex<double> p1, complex<double> p2) {
  double x = p1.real() - p2.real(), y = p1.imag() - p2.imag();
  double pend = x / y, mag = sqrt(x * x + y * y);
  if (y != 0)
    m[make_pair(mag, pend)]++;
  else
    especial[mag]++;
}
int main() {
  int n;
  cin >> n;
  vector<complex<double> > v;
  for (int i = 0; i < n; i++) {
    double c1, c2;
    cin >> c1 >> c2;
    v.push_back(complex<double>(c1, c2));
  }
  for (long long int i = (long long int)(0); i < (long long int)(n); i++) {
    for (long long int j = (long long int)(0); j < (long long int)(n); j++) {
      if (i == j) continue;
      if (!s.count({i, j})) {
        proo(v[i], v[j]);
        s.insert({i, j}), s.insert({j, i});
      }
    }
  }
  long long int ans = 0;
  for (auto x : m) ans += ((x.second - 1) * (x.second)) / 2;
  for (auto x : especial) ans += ((x.second - 1) * (x.second)) / 2;
  cout << ans / 2;
  return 0;
}
