import java.util.* ;
interface acc_tgr {
   static void main(String[] args) {
      Scanner sc = new Scanner(System.in) ;
      int n = sc.nextInt() ;
      int k1 = sc.nextInt() ;
      int k2 = sc.nextInt() ;
      long a[] = new long[n] ;
      for (int i=0; i<n; i++)
         a[i] = sc.nextLong() ;
      long s[] = new long[3*n] ;
      long run = 0 ;
      for (int i=0; i<n; i++) {
         run += a[i] ;
         s[n+i] = run ;
      }
      for (int i=0; i<n; i++)
         s[2*n+i] = run ;
      int minr = n ;
      int maxr = 0 ;
      for (int k=k1; k<=k2; k++) {
         for (int st=0; st<k; st++) {
            int t = 0 ;
            for (int j=st-k; j<n; j += k)
               if (s[n+j+k]-s[n+j]>0)
                  t++ ;
            minr = Math.min(t, minr) ;
            maxr = Math.max(t, maxr) ;
         }
      }
      System.out.println(minr + " " + maxr) ;
   }
}
