#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <sstream>
#include <complex>
#include <ctime>
#include <cassert>
#include <functional>

using namespace std;

typedef long long ll;
typedef vector<int> VI;
typedef pair<int, int> PII;

#define REP(i,s,t) for(int i=(s);i<(t);i++)
#define FILL(x,v) memset(x,v,sizeof(x))

const int INF = (int)1e9;
#define MAXN 30005

int x[MAXN];
int main(){
  int n, kl, kr;
  cin >> n >> kl >> kr;
  REP(i,1,n+1) {
    cin >> x[i];
    x[i] += x[i - 1];
  }
  int maxAns = 0, minAns = INF;
  REP(k,kl,kr+1) {
    int ansMax = 0, ansMin = INF;
    REP(s,1,k+1) {
      int sol = 0;
      if (s > 1 && x[s - 1] > 0) sol++;
      for (int i = s; i <= n; i += k) {
        int e = min(i + k - 1, n);
        int p = x[e] - x[i - 1];
        if (p > 0) sol++;
      }
      ansMax = max(ansMax, sol);
      ansMin = min(ansMin, sol);
    }
    minAns = min(minAns, ansMin);
    maxAns = max(maxAns, ansMax);
  }
  cout << minAns << " " << maxAns << endl;
  return 0;
}
