#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-8;
const int dx[8] = {1, 0, -1, 0, -1, -1, 1, 1};
const int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
const int days[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int leap[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int a[222222];
long long sum[222222];
long long ans, pre;
int n, k, ans1, ans2;
int main() {
  while (scanf("%d%d", &n, &k) == 2) {
    for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
    sum[0] = 0;
    for (int i = 1; i <= n; ++i) sum[i] = sum[i - 1] + a[i];
    ans = 0;
    int j = k;
    pre = k;
    for (int i = k * 2; i <= n; ++i) {
      if (sum[i] + sum[j] - sum[i - k] - sum[j - k] > ans) {
        ans = sum[i] + sum[j] - sum[i - k] - sum[j - k];
        ans1 = j;
        ans2 = i;
      }
      pre++;
      if (sum[pre] - sum[pre - k] > sum[j] - sum[j - k]) j = pre;
    }
    printf("%d %d\n", ans1 - k + 1, ans2 - k + 1);
  }
  return 0;
}
