#include <bits/stdc++.h>
using namespace std;
long long Num[200005], Sum[200005], bSum[200005], a[200005][3], b[200005][3];
int main() {
  long long n, k, MAX = -1, posa = 0, posb = 0;
  scanf("%lld%lld", &n, &k);
  for (int i = 1; i <= n; i++)
    scanf("%lld", &Num[i]), Sum[i] = Sum[i - 1] + Num[i];
  for (int i = n; i >= 1; i--) bSum[i] = bSum[i + 1] + Num[i];
  for (int i = k; i <= n; i++)
    if (Sum[i] - Sum[i - k] >= a[i - 1][1])
      a[i][1] = Sum[i] - Sum[i - k], a[i][2] = i;
    else
      a[i][1] = a[i - 1][1], a[i][2] = a[i - 1][2];
  for (int i = n - k + 1; i >= 1; i--)
    if (bSum[i] - bSum[i + k] >= b[i + 1][1])
      b[i][1] = bSum[i] - bSum[i + k], b[i][2] = i;
    else
      b[i][1] = b[i + 1][1], b[i][2] = b[i + 1][2];
  for (int i = k; i <= n - k; i++) {
    if (a[i][1] + b[i + 1][1] > MAX)
      MAX = a[i][1] + b[i + 1][1], posa = a[i][2], posb = b[i + 1][2];
  }
  printf("%lld %lld\n", posa - k + 1, posb);
}
