#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target("avx2")
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
using namespace std;
const int mod = 1000000007;
const int mxn = 4e5 + 7;
const int inf = 1000000007;
long long _, n, m, t, k, u, w, v, ans, cnt, ok, lim, len, tmp, last;
struct node {
  int x, y, t;
};
string str;
long long a[mxn], b[mxn], c[mxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  while (cin >> n >> k) {
    ans = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      a[i] += a[i - 1];
    }
    for (int i = n - k + 1; i > 0; i--) {
      b[i] = max(b[i + 1], a[i + k - 1] - a[i - 1]);
      c[i] = c[i + 1];
      if (b[i] == a[i + k - 1] - a[i - 1]) c[i] = i;
    }
    int p1, p2;
    for (int i = k; i <= n - k; i++) {
      tmp = a[i] - a[i - k] + b[i + 1];
      if (tmp > ans) ans = tmp, p1 = i - k + 1, p2 = c[i + 1];
    }
    cout << p1 << " " << p2 << endl;
  }
}
bool isPrime(int num) {
  if (num == 1) return 0;
  if (num == 2 || num == 3) return 1;
  if (num % 6 != 1 && num % 6 != 5) return 0;
  int tmp = sqrt(num);
  for (int i = 5; i <= tmp; i += 6)
    if (num % i == 0 || num % (i + 2) == 0) return 0;
  return 1;
}
