#include <bits/stdc++.h>
using namespace std;
long long n, arr[200100], ugu, k;
pair<long long, long long> halp, a, b;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> ugu;
    arr[i] = arr[i - 1] + ugu;
  }
  a.first = halp.first = arr[k], b.first = arr[2 * k] - arr[k],
  a.second = halp.second = 1, b.second = k + 1;
  for (int i = (2 * k) + 1, j = k + 1; i <= n; i++, j++) {
    if (arr[j] - arr[j - k] > halp.first)
      halp.first = arr[j] - arr[j - k], halp.second = j - k + 1;
    if (arr[i] - arr[i - k] + halp.first > a.first + b.first) {
      a.first = halp.first, a.second = halp.second;
      b.first = arr[i] - arr[i - k], b.second = i - k + 1;
    }
  }
  cout << a.second << " " << b.second;
}
