#include <bits/stdc++.h>
using namespace std;
int n, k;
long long p[200000 + 1000];
long long sum[200000 + 1000];
long long Max[200000 + 1000];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> p[i];
  if (n == 2 * k) {
    cout << 1 << ' ' << k + 1 << endl;
    return 0;
  }
  Max[n] = n;
  for (int i = n; i > n - k; i--) {
    sum[i] = sum[i + 1] + p[i];
    Max[i] = Max[i + 1];
    if (sum[i] >= sum[Max[i]]) Max[i] = i;
  }
  for (int i = n - k; i > 0; i--) {
    sum[i] = sum[i + 1] + p[i] - p[i + k];
    Max[i] = Max[i + 1];
    if (sum[i] >= sum[Max[i]]) Max[i] = i;
  }
  pair<int, int> ans = make_pair(0, 0);
  for (int i = 1; i <= n - k; i++)
    if (sum[ans.first] + sum[ans.second] < sum[i] + sum[Max[i + k]]) {
      ans.first = i;
      ans.second = Max[i + k];
    }
  cout << ans.first << ' ' << ans.second << endl;
  return 0;
}
