#include <bits/stdc++.h>
using namespace std;
long long int n, k, w[200001], a, b, bb, s1, s2, v[200001];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> w[i];
  long long int t = 1;
  for (; t <= k; t++) v[1] += w[t];
  t = k + 1;
  while (t <= n) {
    v[t - k + 1] = v[t - k] - w[t - k] + w[t];
    t++;
  }
  for (int i = n - 2 * k + 1; i >= 1; i--) {
    if (v[i + k] >= s1) s1 = v[i + k], b = i + k;
    if (s2 <= s1 + v[i]) s2 = s1 + v[i], a = i, bb = b;
  }
  cout << a << " " << bb;
}
