#include <bits/stdc++.h>
using namespace std;
int ret = 0, x[2005], y[2005];
map<pair<long long, long long>, long long> aye;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
    for (int j = 0; j < i; ++j) {
      ret += aye[{x[i] + x[j], y[i] + y[j]}];
      ++aye[{x[i] + x[j], y[i] + y[j]}];
    }
  }
  cout << ret << endl;
}
