#!/usr/bin/python3

g = []

N, KL, KR = map(int,input().split())

for i in range(N):
	val = int(input())
	g.append(val)

g_sum = [g[0]]
for i in range(N-1):
	g_sum.append(g_sum[-1]+g[i+1])

for i in range(N+KR):
	g_sum.append(g_sum[-1])

mi = 1000000000
ma = -1000000000

for i in range(KL, KR+1):
	gain = [0] * KR
	for j in range(N+i-1):
		if j-i >= 0:
			temp = g_sum[j] - g_sum[j-i]
		else:
			temp = g_sum[j]
		if temp > 0:
			gain[j % i] += 1
	mi = min(mi, min(gain[:i]))
	ma = max(ma, max(gain[:i]))

print(mi,ma)
