#include <iostream>
#include <limits>
#include <vector>

int main()
{
    int64_t n, l, h;
    std::cin >> n >> l >> h;
    
    std::vector<int64_t> p(n);
    for(int i=0; i<n; i++)
        std::cin >> p[i];
        
    int best = 0;
    int worst = std::numeric_limits<int>::max();
    for(int L = l; L <= h; L++)
    {        
    
        std::vector<int64_t> rolling(n+L+1);
        rolling[0] = 0;
        for(int i=0; i<n+L; i++)
        {
            int cur = rolling[i];
            int prev = i - L;
            if(prev >= 0)
                cur -= p[prev];
            if(i < n)
                cur += p[i];
            rolling[i+1] = cur;
        }
    
        for(int start = 0; start < L; start++)
        {
            int cur = start;
            int profitable = 0;
            while(cur <= n+L)
            {
                if(rolling[cur] > 0)
                    profitable++;
                cur += L;
            }
            
            if(profitable > best)
                best = profitable;
            if(profitable < worst)
                worst = profitable;
        }
    }
    std::cout << worst << " " << best << std::endl;
}
