#include <bits/stdc++.h>
using namespace std;
int di[9] = {-1, 1, 0, 0, -1, -1, 1, 1, 0};
int dj[9] = {0, 0, -1, 1, 1, -1, -1, 1, 0};
pair<int, int> dij[9] = {make_pair(-1, 0), make_pair(1, 0),   make_pair(0, -1),
                         make_pair(0, 1),  make_pair(-1, -1), make_pair(-1, 1),
                         make_pair(1, -1), make_pair(1, 1),   make_pair(0, 0)};
pair<int, int> operator+(const pair<int, int>& a, const pair<int, int>& b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
ostream& operator<<(ostream& stream, pair<long long, int> x) {
  stream << x.first << " " << x.second;
  return stream;
}
const int MAXN = 200010;
long long A[MAXN], S[MAXN];
priority_queue<pair<long long, int> > H;
int main() {
  int n;
  cin >> n;
  int k;
  cin >> k;
  for (int i = 0; i < (n); ++i) {
    cin >> S[i + 1];
    S[i + 1] += S[i];
  }
  for (int i = 0; i < (n - k + 1); ++i) {
    A[i] = S[i + k] - S[i];
    H.push(make_pair(A[i], -i));
  }
  long long ans = 0;
  pair<int, int> out;
  for (int i = 0; i < (n - k - k + 1); ++i) {
    while (-H.top().second - i < k) {
      H.pop();
    }
    if (A[i] + H.top().first > ans) {
      ans = A[i] + H.top().first;
      out = make_pair(i + 1, 1 - H.top().second);
    }
  }
  cout << (out) << endl;
  return 0;
}
