// Arup Guha
// 2/25/2023
// Solution? to 2022 SER D1/D2 Problem: Creative Accounting

using namespace std;

#include <iostream>
#include <vector>

int main() {

    int n, low, high;
    cin >> n >> low >> high;

    // Read numbers.
    vector<int> nums;
    for (int i=0; i<n; i++) {
        int x;
        cin >> x;
        nums.push_back(x);
    }

    // Create cumulative frequency.
    vector<int> cf;
    cf.push_back(0);
    for (int i=1; i<=n; i++)
        cf.push_back(cf[i-1]+nums[i-1]);


    int minR = n, maxR = 0;

    // t is segment we are trying.
    for (int t=low; t<=high; t++) {

        // sI number of items in first group.
        for (int sI=1; sI<=t; sI++) {

            // Go through each segment with sI items in the first group.
            int tmp = 0,prev=0;
            for (int x=sI; x<=n;) {
                if (x == prev) break;
                int seg = cf[x]-cf[prev];
                if (seg > 0) tmp++;
                prev = x;
                x = x+t<=n ? x+t : n;
            }

            // Update these as necessary.
            if (tmp < minR) minR = tmp;
            if (tmp > maxR) maxR = tmp;
        }
    }

    // Ta da!
    cout << minR << " " << maxR << endl;
    return 0;
}
