#include <bits/stdc++.h>
using namespace std;
long long a[200040];
long long deepika(int l, int r) {
  if (l == 0) {
    return a[r];
  }
  return a[r] - a[l - 1];
}
int main() {
  int n, k, i, j;
  scanf("%d %d", &n, &k);
  long long sum1, sum2, tot, temp, s1, s2;
  a[0] = 0;
  for (i = 1; i <= n; i++) {
    scanf("%lld", a + i);
    a[i] += a[i - 1];
  }
  tot = deepika(1, k) + deepika(k + 1, 2 * k);
  pair<int, int> ans = {1, k + 1};
  sum1 = deepika(1, k);
  pair<int, long long> fr = {1, sum1};
  for (i = 2; i <= n - 2 * k + 1; i++) {
    temp = deepika(i, i + k - 1);
    if (temp > sum1) {
      sum1 = temp;
      fr = {i, sum1};
    }
    s1 = deepika(i + k, i + 2 * k - 1) + sum1;
    if (s1 > tot) {
      tot = s1;
      ans = {fr.first, i + k};
    }
  }
  printf("%d %d\n", ans.first, ans.second);
  return 0;
}
