#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
long long a[maxn];
long long sum[maxn];
int n, k;
int main() {
  while (~scanf("%d%d", &n, &k)) {
    for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
    sum[0] = 0;
    for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + a[i];
    for (int i = 1; i <= n - k + 1; i++) a[i] = sum[i + k - 1] - sum[i - 1];
    long long ans = a[1], MAX = a[1];
    int l = 1, r = 1;
    int maxl = 1, maxr = 1;
    for (int i = 1; i <= n - k + 1; i++) {
      if (a[i] > ans) {
        ans = a[i];
        l = i;
      }
      if (ans + a[i + k] > MAX) {
        MAX = ans + a[i + k];
        maxl = l;
        maxr = i + k;
      }
    }
    printf("%d %d\n", maxl, maxr);
  }
  return 0;
}
