#include <bits/stdc++.h>
using namespace std;
const long long oo = (1LL << 62);
int n, K, idma, id2, id1;
long long ans, acum[200012], ma, curr;
vector<long long> tree;
long long get(int ini) { return (acum[ini + K - 1] - acum[ini - 1]); }
void update(int u, int i, int j, int idx, long long val) {
  if (idx < i || idx > j) return;
  if (i == j) {
    tree[u] = val;
    return;
  }
  update((u << 1), i, ((i + j) >> 1), idx, val);
  update(((u << 1) | 1), ((i + j) >> 1) + 1, j, idx, val);
  tree[u] = max(tree[(u << 1)], tree[((u << 1) | 1)]);
}
long long query(int u, int i, int j, int l, int r) {
  if (r < i || l > j) return -oo;
  if (l <= i && j <= r) return tree[u];
  long long lans = query((u << 1), i, ((i + j) >> 1), l, r);
  long long rans = query(((u << 1) | 1), ((i + j) >> 1) + 1, j, l, r);
  return max(lans, rans);
}
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(0);
  long long x;
  scanf("%d %d", &n, &K);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &x);
    acum[i] = acum[i - 1] + x;
  }
  tree = vector<long long>(4 * (n + 5), -oo);
  for (int i = 1; i <= n - K + 1; ++i) {
    update(1, 1, n, i, get(i));
  }
  ma = -1;
  for (int i = 1; i <= n - K + 1; ++i) {
    curr = query(1, 1, n, i + K, n) + get(i);
    if (curr > ans) {
      id1 = i;
      ans = curr;
    }
  }
  printf("%d ", id1);
  for (int i = id1 + K; i <= n - K + 1; ++i) {
    if (get(id1) + get(i) == ans) {
      printf("%d\n", i);
      return 0;
    }
  }
  return 0;
}
