#include <bits/stdc++.h>
using namespace std;
const int Nmax = 2005;
int n, k;
pair<double, double> mij[Nmax * Nmax];
pair<int, int> a[Nmax];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i].first >> a[i].second;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      mij[++k] = {(double)(a[i].first + a[j].first) / 2,
                  (double)(a[i].second + a[j].second) / 2};
  sort(mij + 1, mij + k + 1);
  int cnt;
  long long sol = 0;
  cnt = 1;
  for (int i = 2; i <= k;) {
    while (i <= k && mij[i].first == mij[i - 1].first &&
           mij[i].second == mij[i - 1].second) {
      i++;
      cnt++;
    }
    sol += (cnt * (cnt - 1)) / 2;
    cnt = 1;
    i++;
  }
  cout << sol << "\n";
  return 0;
}
