#include <bits/stdc++.h>
using namespace std;
const int maxx = 2e5 + 10;
long long arr[maxx + 5];
int main() {
  long long n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    arr[i] = x + arr[i - 1];
  }
  long long lag = 0, best = 0, x, y, ans;
  for (int i = n - (2 * k) + 1; i > 0; i--) {
    long long j = i + k;
    if (arr[j + k - 1] - arr[j - 1] >= lag) {
      lag = arr[j + k - 1] - arr[j - 1];
      ans = j;
    }
    if (arr[j - 1] - arr[i - 1] + lag >= best) {
      best = arr[j - 1] - arr[i - 1] + lag;
      y = ans;
      x = i;
    }
  }
  cout << x << " " << y << endl;
  return 0;
}
