#include <bits/stdc++.h>
using namespace std;
long long a[200001];
pair<long long, long long> p[200001];
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  long long i, j, k, m, n, tmp, prev, r = 0, c = 0;
  string s, t;
  pair<long long, long long> ans;
  cin >> n >> k;
  m = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (j = 0; j < k; j++) {
    m += a[j];
  }
  p[0].first = m;
  p[0].second = 0;
  for (j = 1; 1 < n - k ? j < n - k : j > n - k; 1 < n - k ? j += 1 : j -= 1) {
    m += (a[j + k - 1] - a[j - 1]);
    p[j] = p[j - 1];
    if (m > p[j - 1].first) {
      p[j].first = m;
      p[j].second = j;
    }
  }
  m = 0;
  for (j = 0; j < k; j++) {
    m += a[k + j];
  }
  if (p[0].first + m > r) {
    r = p[0].first + m;
    ans = {p[0].second, k};
  }
  for (j = k + 1; k + 1 < n - k + 1 ? j < n - k + 1 : j > n - k + 1;
       k + 1 < n - k + 1 ? j += 1 : j -= 1) {
    m += a[k + j - 1];
    m -= a[j - 1];
    if (p[j - k].first + m > r) {
      r = p[j - k].first + m;
      ans = {p[j - k].second, j};
    }
  }
  cout << ans.first + 1 << " " << ans.second + 1 << endl;
}
