#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dump(...)
#endif
#define endl "\n"
#define ll long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define RREPS(i, x) for (int i = ((int)(x)); i > 0; i--)
#define INF 2147483647
#define LLINF 9223372036854775807LL
#define vi vector<int>
#define vvi vector<vector<int>>
#define pi pair<int, int>
#define ALL(a) (a).begin(), (a).end()
#define BIT(n) (1LL << (n))
#define TOUPPER(s) transform(s.begin(), s.end(), s.begin(), ::toupper)
#define TOLOWER(s) transform(s.begin(), s.end(), s.begin(), ::tolower)
#define FILLZERO(s, n)                      \
    do {                                    \
        ostringstream os;                   \
        os << setw(n) << setfill('0') << s; \
        s = os.str();                       \
    } while (0);
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてからつかうこと
#define INIT                               \
    std::cin.tie(nullptr);                 \
    std::ios_base::sync_with_stdio(false); \
    cout << std::fixed << std::setprecision(10);
constexpr ll MOD = 1e9 + 7;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
ll ans = 0;
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
    for (T &x : vec)
        is >> x;
    return is;
}

template <class T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}

template <typename T>
vector<T> divisor(T &n) {
    vector<T> res;
    for (T i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            res.push_back(i);
            if (i * i != n) {
                res.push_back(n / i);
            }
        }
    }
    return res;
}

signed main() {
    INIT;
    cin >> N >> A >> B;
    vector<ll> v(N);
    cin >> v;
    vector<vector<ll>> dp1(N + 1, vector<ll>(N + 1, -1));
    vector<vector<ll>> dp2(N + 1, vector<ll>(N + 1));
    dp1[0][0] = 0;
    dp2[0][0] = 1;
    REP(i, N) {
        REP(j, N) {
            if (dp1[i][j] < 0)
                continue;
            if (dp1[i + 1][j] == dp1[i][j]) {
                dp2[i + 1][j] += dp2[i][j];
            }
            if (chmax(dp1[i + 1][j], dp1[i][j])) {
                dp2[i + 1][j] = dp2[i][j];
            }
            if (dp1[i + 1][j + 1] == dp1[i][j] + v[i]) {
                dp2[i + 1][j + 1] += dp2[i][j];
            }
            if (chmax(dp1[i + 1][j + 1], dp1[i][j] + v[i])) {
                dp2[i + 1][j + 1] = dp2[i][j];
            }
        }
    }
    dump(dp2);
    long double res = 0;
    int ind = 0;
    REP(i, N + 1) {
        if (A <= i && i <= B) {
            chmax(res, dp1[N][i] / (long double)(i));
        }
    }
    REP(i, N + 1) {
        if (A <= i && i <= B) {
            if (res == dp1[N][i] / (long double)(i)) {
                ans += dp2[N][i];
            }
        }
    }
    cout << res << endl;
    cout << ans << endl;
}

Measured memory_bytes: 3824