#include <bits/stdc++.h>
using namespace std;
long long n, k, a, t, i, m, j, d[200005], h, x[200005];
string s;
int main() {
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> d[i];
    x[i] = d[i];
    if (i <= k) h = h + d[i];
  }
  for (i = k; i <= n; i++) {
    d[i] = h;
    h = h - x[i - k + 1] + d[i + 1];
  }
  j = n;
  h = d[n];
  for (i = n - k; i >= k; i--) {
    if (d[i] + h >= m) {
      m = d[i] + h;
      a = i - k + 1;
      t = j - k + 1;
    }
    if (d[i + k - 1] >= h) {
      h = d[i + k - 1];
      j = i + k - 1;
    }
  }
  cout << a << " " << t;
}
