#include <bits/stdc++.h>
using namespace std;
const int N = int(2e5 + 1);
int n, k;
long long sum[N];
int main() {
  sum[0] = 0;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &sum[i]);
    sum[i] += sum[i - 1];
  }
  long long max_a = 0, res = 0;
  int a = 0, b = 0, a_a = 0;
  for (int i = 2 * k; i <= n; ++i) {
    long long sum_b = sum[i] - sum[i - k];
    long long sum_a = sum[i - k] - sum[i - 2 * k];
    if (sum_a > max_a) {
      max_a = sum_a;
      a_a = i - 2 * k + 1;
    }
    if (max_a + sum_b > res) {
      res = max_a + sum_b;
      a = a_a;
      b = i - k + 1;
    }
  }
  printf("%d %d", a, b);
  return 0;
}
