import std.stdio, std.conv, std.functional, std.string;
import std.algorithm, std.array, std.container, std.typecons;
import std.numeric, std.math;
import core.bitop;

T RD(T = long)() { static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res.to!T; }
string RDR()() { return readln.chomp; }
T[] ARR(T = long)(in string str, T fix = 0) { auto r = str.split.to!(T[]); r[] += fix; return r; }
size_t[] MAKE_IDX(alias less = "a < b", Range)(Range range) { auto idx = new size_t[](range.length); makeIndex!(less)(range, idx); return idx;}
size_t MIN_POS(alias less = "a < b", Range)(Range range) { auto r = minPos!(less)(range); return range.length - r.length; }

bool inside(T)(T x, T b, T e) { return x >= b && x < e; }
bool minimize(T)(ref T x, T y) { if (x > y) { x = y; return true; } else { return false; } }
bool maximize(T)(ref T x, T y) { if (x < y) { x = y; return true; } else { return false; } }

long mod = 10^^9 + 7;
void moda(ref long x, long y) { x = (x + y) % mod; }
void mods(ref long x, long y) { x = ((x + mod) - (y % mod)) % mod; }
void modm(ref long x, long y) { x = (x * y) % mod; }

long[][] p_triangle(long n)
{
	auto dp = new long[][](n+1, n+1);
	dp[0][0] = 1;
	foreach (i; 1..n+1)
	{
		foreach (j; 0..n+1)
		{
			if (j >= 1)
				dp[i][j] = dp[i-1][j-1] + dp[i-1][j];
			else
				dp[i][j] = dp[i-1][j];
		}
	}
	return dp;
}

void main()
{
	auto N = RD;
	auto A = RD;
	auto B = RD;
	auto v = RDR.ARR;
	v.sort!"a > b"();
	auto avg = sum(v[0..A]) / cast(double)A;
	auto x = v[A-1];
	long k;
	foreach_reverse (i; 0..A)
	{
		if (v[i] != x) break;
		++k;
	}
	long n = k;
	long preCnt = A - k;
	foreach (i; A..N)
	{
		if (v[i] != x) break;
		if (v[i] == avg) ++k;
		++n;
	}
	auto pt    = p_triangle(n);
	auto begin = min(A - preCnt, k);
	auto end   = min(B - preCnt, k) + 1;
	long cnt;
	foreach (i; begin..end)
		cnt += pt[n][i];
	writeln(avg);
	writeln(cnt);
	stdout.flush();
}