#include <bits/stdc++.h>
using namespace std;
long long mass[200003];
long long pre[200003], best, bestb;
int main() {
  int n, k, i, j, a, b, bi;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> mass[i];
    pre[i] = mass[i] + pre[i - 1];
  }
  for (i = n - 2 * k + 1; i >= 1; i--) {
    long long ax, bx;
    ax = pre[i + k - 1] - pre[i - 1];
    bx = pre[i + 2 * k - 1] - pre[i + k - 1];
    if (bx >= bestb) {
      bestb = bx;
      bi = i + k;
    }
    if (ax + bestb >= best) {
      best = ax + bestb;
      a = i;
      b = bi;
    }
  }
  cout << a << " " << b << endl;
  return 0;
}
