#include <bits/stdc++.h>
using namespace std;
int n, i, j;
int x[2222], y[2222];
map<pair<int, int>, int> e;
long long ans;
long long c2(int n) { return (1ll * n * (n - 1)) / 2; }
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      ans += e[make_pair(x[i] + x[j], y[i] + y[j])];
      e[make_pair(x[i] + x[j], y[i] + y[j])]++;
    }
  }
  cout << ans;
  return 0;
}
