#include<iostream>
#include<vector>
using namespace std;
const int MAX_N = 100'000;
int a_sum[MAX_N + 1];
int n, d;
int l, r;
bool good(double mid) {
double mi = 1e18;
double mi_pos = -1;
for(int i = d; i <= n; i++) {
int j = i - d;
cout << j * mid << endl;
if(mi > a_sum[j] - j * mid) {
mi = a_sum[j] - j * mid;
mi_pos = j + 1;
}
if(a_sum[i] - i * mid >= mi) {
l = mi_pos;
r = i;
return 1;
}
}
return 0;
}
int main() {
cin >> n >> d;
for(int i = 1; i <= n; i++) {
int x;
cin >> x;
a_sum[i] = x + a_sum[i - 1];
}
double low = -1, hi = 100;
for(int i = 0; i < 60; i++) {
double mid = (low + hi) / 2;
if(good(mid)) {
low = mid;
} else {
hi = mid;
}
}
cout << l << ' ' << r << '\n';
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPHZlY3Rvcj4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKY29uc3QgaW50IE1BWF9OID0gMTAwJzAwMDsKaW50IGFfc3VtW01BWF9OICsgMV07CmludCBuLCBkOwppbnQgbCwgcjsKYm9vbCBnb29kKGRvdWJsZSBtaWQpIHsKICAgIGRvdWJsZSBtaSA9IDFlMTg7CiAgICBkb3VibGUgbWlfcG9zID0gLTE7CiAgICBmb3IoaW50IGkgPSBkOyBpIDw9IG47IGkrKykgewogICAgICAgIGludCBqID0gaSAtIGQ7CiAgICAgICAgY291dCA8PCBqICogbWlkIDw8IGVuZGw7IAogICAgICAgIGlmKG1pID4gYV9zdW1bal0gLSBqICogbWlkKSB7CiAgICAgICAgICAgIG1pID0gYV9zdW1bal0gLSBqICogbWlkOwogICAgICAgICAgICBtaV9wb3MgPSBqICsgMTsKICAgICAgICB9CiAgICAgICAgaWYoYV9zdW1baV0gLSBpICogbWlkID49IG1pKSB7CiAgICAgICAgICAgIGwgPSBtaV9wb3M7CiAgICAgICAgICAgIHIgPSBpOwogICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gMDsKfQppbnQgbWFpbigpIHsKICAgIGNpbiA+PiBuID4+IGQ7CiAgICBmb3IoaW50IGkgPSAxOyBpIDw9IG47IGkrKykgewogICAgICAgIGludCB4OwogICAgICAgIGNpbiA+PiB4OwogICAgICAgIGFfc3VtW2ldID0geCArIGFfc3VtW2kgLSAxXTsKICAgIH0KICAgIGRvdWJsZSBsb3cgPSAtMSwgaGkgPSAxMDA7CiAgICBmb3IoaW50IGkgPSAwOyBpIDwgNjA7IGkrKykgewogICAgICAgIGRvdWJsZSBtaWQgPSAobG93ICsgaGkpIC8gMjsKICAgICAgICBpZihnb29kKG1pZCkpIHsKICAgICAgICAgICAgbG93ID0gbWlkOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGhpID0gbWlkOwogICAgICAgIH0KICAgIH0KICAgIGNvdXQgPDwgbCA8PCAnICcgPDwgciA8PCAnXG4nOwp9