#include <iostream>
#include <vector>

using namespace std;

int main() {
  int n, a, b;
  cin >> n >> a >> b;
  vector<int64_t> dp(n+1);
  for(int i = 1; i <= n; i++) {
    cin >> dp[i];
    dp[i] += dp[i-1];
  }
  int lret = n;
  int rret = 0;
  for(int cand = a; cand <= b; cand++) {
    for(int offset = 0; offset < cand; offset++) {
      int amt = 0;
      int curr = offset;
      while(true) {
        if(curr > 0) amt += dp[min(n, curr)] - dp[max(0, curr - cand)] > 0;
        if(curr >= n) break;
        curr += cand;
      }
      lret = min(lret, amt);
      rret = max(rret, amt);
    }
  }
  cout << lret << " " << rret << "\n";
}