#include <bits/stdc++.h>
using namespace std;
const int max_N = 200000 + 10;
long long n, k, x, ps[max_N];
pair<long long, int> seg[4 * max_N];
pair<long long, int> merge(pair<long long, int> a, pair<long long, int> b) {
  if (a.first > b.first || (a.first == b.first && a.second < b.second))
    return a;
  return b;
}
void build(int st = 0, int en = n, int ind = 1) {
  if (en - st == 1) {
    if (st + k <= n) seg[ind].first = ps[st + k] - ps[st];
    seg[ind].second = st;
    return;
  }
  int mid = (st + en) / 2;
  build(st, mid, 2 * ind);
  build(mid, en, 2 * ind + 1);
  seg[ind] = merge(seg[2 * ind], seg[2 * ind + 1]);
}
pair<long long, int> get(int l, int r, int st = 0, int en = n, int ind = 1) {
  if (l >= en || r <= st) return make_pair(0, -1);
  if (l <= st && r >= en) return seg[ind];
  int mid = (st + en) / 2;
  return merge(get(l, r, st, mid, 2 * ind), get(l, r, mid, en, 2 * ind + 1));
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> x;
    ps[i + 1] = ps[i] + x;
  }
  build();
  long long ans(0), a, b;
  for (int i = 0; i <= n - (2 * k); i++) {
    pair<long long, int> t = get(i + k, n);
    if (t.first + ps[i + k] - ps[i] > ans) {
      ans = t.first + ps[i + k] - ps[i];
      a = i, b = t.second;
    }
  }
  cout << a + 1 << ' ' << b + 1 << endl;
  return 0;
}
