#include <bits/stdc++.h>
using namespace std;
long long a[200005], b[200005];
int n, k;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    a[i] += a[i - 1];
  }
  for (int i = 1, j = 1; i <= n - k + 1; i++, j++) {
    b[j] = a[i + k - 1] - a[i - 1];
  }
  int l, r, t;
  long long ans = 0, cnt = 0;
  for (int i = 1; i <= n - 2 * k + 1; i++) {
    if (cnt < b[i]) {
      cnt = b[i];
      t = i;
    }
    if (cnt + b[i + k] > ans) {
      ans = cnt + b[i + k];
      l = t;
      r = i + k;
    }
  }
  printf("%d %d\n", l, r);
  return 0;
}
