#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
long long mod = 1e9 + 9, a, b;
int t, j, cs = 0, n, i;
string s;
int main() {
  cin >> n;
  int x[n], y[n];
  for (i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  map<pair<long long, long long>, int> cnt;
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      a = x[i] + x[j];
      b = y[i] + y[j];
      cnt[make_pair(a, b)]++;
    }
  }
  long long ans = 0;
  for (auto it : cnt) {
    ans += it.second * (it.second - 1) / 2;
  }
  cout << ans << "\n";
}
