import java.util.*;

public class acc_an {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int N = s.nextInt(), L = s.nextInt(), R = s.nextInt();
    int[] P = new int[N];
    for (int i = 0; i < N; i++) P[i] = s.nextInt();
    
    int lo = N, hi = -N;
    int[] seg = new int[N + 2];
    int cur = 0;
    for (int K = L; K <= R; K++) {
      Arrays.fill(seg, 0);
      for (int i = 0; i < N; i++) seg[i / K] += P[i];
      cur = 0;
      for (int i = 0; i < N / K + 2; i++) if (seg[i] > 0) cur++;
      if (lo > cur) lo = cur;
      if (hi < cur) hi = cur;
      for (int shift = K - 1; shift > 0; shift--) {
        for (int pos = shift; pos < N; pos += K) {
          seg[pos / K] -= P[pos];
          seg[pos / K + 1] += P[pos];
        }
        cur = 0;
        for (int i = 0; i < N / K + 2; i++) if (seg[i] > 0) cur++;
        if (lo > cur) lo = cur;
        if (hi < cur) hi = cur;
      }
    }

    System.out.println(lo + " " + hi);
  }
}
