#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.first == b.first) {
    return a.second > b.second;
  }
  return a.first < b.first;
}
long long n, k, x[2 * 100005], sum[2 * 100005] = {0};
long long a, b, mx = 0, d, m1, m2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    sum[i] = sum[i - 1] + x[i];
  }
  vector<long long> rakh;
  for (int i = k; i <= n; i++) {
    rakh.push_back(sum[i] - sum[i - k]);
  }
  long long mx = 0, t, ans = 0;
  for (int i = 0; i < rakh.size() - k; i++) {
    if (rakh[i] > mx) {
      mx = rakh[i];
      t = i + 1;
    }
    if (mx + rakh[i + k] > ans) {
      ans = mx + rakh[i + k];
      a = t;
      b = i + k + 1;
    }
  }
  cout << a << ' ' << b << endl;
}
