#!/bin/python3

N, L, R = map(int, input().split())

P = [int(input()) for _ in range(N)]

lo = N
hi = -N

for K in range(L, R + 1):
  seg = [0] * (N // K + 2)
  for i in range(N):
    seg[i // K] += P[i]
  cur = 0
  for j in range(len(seg)):
     if seg[j] > 0:
        cur += 1
  (lo, hi) = (min(lo, cur), max(hi, cur))
  for i in range(K - 1):
    pos = K - i - 1
    while pos < N:
      seg[pos // K] -= P[pos]
      seg[pos // K + 1] += P[pos]
      pos += K
    cur = 0
    for j in range(len(seg)):
       if seg[j] > 0:
          cur += 1
    (lo, hi) = (min(lo, cur), max(hi, cur))

print(str(lo) + " " + str(hi))
