#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a, b;
  cin >> n >> a >> b;
  priority_queue<long long> pq;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    pq.push(x);
  }
  if (a > b) swap(a, b);
  long long x = a, y = b, sum = 0, sum1 = 0;
  while (x) {
    sum += pq.top();
    pq.pop();
    x--;
  }
  while (y) {
    sum1 += pq.top();
    pq.pop();
    y--;
  }
  double ans = (1.0 * sum / a + 1.0 * sum1 / b);
  cout << setprecision(15) << ans << endl;
}
