#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
void Code_By_Mohamed_Khaled() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
}
ll Sum_of_range(ll l, ll r) {
if (l > r) return 0;
return r * (r + 1) / 2 - l * (l - 1) / 2;
}
const int MOD = 1e9 + 7;
const int MAX_N = 1e7;
vector<ll> fact(MAX_N + 1),invFact(MAX_N + 1);
ll mod = 1e9 + 7;
ll add(ll a, ll b) { return ((b % mod) + (a % mod)) % mod; }
ll mul(ll a, ll b) { return ((b % mod) * (a % mod)) % mod; }
ll fast_power(ll base,ll power,ll mod=LLONG_MAX)
{
if(power==0)return 1;
ll res=1;
base%=mod;
while(power)
{
if(power&1)res*=base,res%=mod;
power/=2;base*=base;
res%=mod;
base%=mod;
}
return res;
}
ll modInverse(ll a, ll mod) {
return fast_power(a,mod-2,mod);
}
ll nCr(ll n, ll r,ll mod=LLONG_MAX)
{
if(r>n)return 0;
ll res=1;r=min(r,n-r);
for(ll i=0;i<r; ++i)res*=(n-i),res/=(i+1),res%=mod;
return res;
}
ll n,A,B;vector<ll>v;map<ll,ll>mp;
pair<double,ll>sol(ll a) {
long double sum=0;map<ll,ll>m;
for (ll i=0;i<a;i++)sum+=v[i],m[v[i]]++;
ll ans=1;long double mean=sum/a;
for (auto it:m) {
ans*=nCr(mp[it.first],it.second);
}
return {mean,ans};
}
int main() {
Code_By_Mohamed_Khaled(); cin>>n>>A>>B;v.resize(n);
for (auto &x:v) cin>>x,mp[x]++;
sort(v.rbegin(),v.rend());
long double max_mean=0;ll cnt=0;
for (ll i=A;i<=B;i++) {
auto ans=sol(i);
if (ans.first > max_mean) {
max_mean = ans.first;
cnt = ans.second;
} else if (ans.first==max_mean) {
cnt += ans.second;
}
}
cout<<fixed<<setprecision(6)<<max_mean<<"\n"<<cnt;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnR5cGVkZWYgbG9uZyBsb25nIGxsOwp1c2luZyBuYW1lc3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