#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
  int N, Kl, Kr;
  while (cin >> N >> Kl >> Kr) {
    vector<int> D(2*Kr+N), sum(2*Kr+N);
    for (int i = 0; i < N; i++) cin >> D[Kr+i];

    int retMin = 1e9, retMax = -1e9;
    for (int K = Kl; K <= Kr; K++) {
      for (int i = 0, s = 0; i+K < D.size(); i++) {
        sum[i] = s;
        s += D[i+K]-D[i];
      }
      for (int i = 0; i < K; i++) {
        int cur = 0;
        for (int j = i; j < sum.size(); j += K) cur += (sum[j] > 0);
        retMin = min(retMin, cur);
        retMax = max(retMax, cur);
      }
    }

    cout << retMin << ' ' << retMax << endl;
  }
}
