#include <bits/stdc++.h>
int ans[200010];
long long s[200010];
long long ms[200010];
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  s[0] = 0;
  memset(ms, 0, sizeof(ms));
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ans[i]), s[i] = s[i - 1] + ans[i];
    if (i >= k) ms[i] = s[i] - s[i - k];
  }
  long long maxs = 0;
  int tmp = n - k + 1;
  int x, y;
  for (int i = tmp - k; i >= 1; i--) {
    if (ms[tmp + k - 1] <= ms[i + k + k - 1]) tmp = i + k;
    if (ms[i + k - 1] + ms[tmp + k - 1] >= maxs)
      maxs = ms[i + k - 1] + ms[tmp + k - 1], x = i, y = tmp;
  }
  printf("%d %d\n", x, y);
  return 0;
}
