#include <bits/stdc++.h>
using namespace std;
long long int min(long long int a, long long int b, long long int c,
                  long long int d) {
  long long int arr[4] = {a, b, c, d};
  sort(arr, arr + 4);
  return arr[0];
}
long long int max(long long int a, long long int b, long long int c,
                  long long int d) {
  long long int arr[4] = {a, b, c, d};
  sort(arr, arr + 4);
  return arr[3];
}
long long int gcd(long long int a, long long int b) {
  if (b < a) {
    int temp = a;
    a = b;
    b = temp;
  }
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return (a * b / gcd(a, b));
}
vector<long long int> getprimes() {
  vector<long long int> pl(101, 1);
  for (int i = 2; i <= 100; i++) {
    if (pl[i] == 1) {
      for (int j = 2 * i; j <= 100; j += i) {
        pl[j] = 0;
      }
    }
  }
  return pl;
}
double dist(double x1, double y1, double x2, double y2) {
  return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
long long int fact(long long int first) {
  long long int ans = 1;
  if (first == 0) {
    return 1;
  }
  while (first > 0) {
    ans = (ans * first) % 1000000007;
    first--;
  }
  return ans % 1000000007;
}
long long int power(long long int a, long long int b) {
  long long int ans = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      ans *= a;
      ans = ans % 1000000007;
    }
    b /= 2;
    a *= a;
    a = a % 1000000007;
  }
  return ans % 1000000007;
}
long long int mod(long long int a, long long int b) {
  return (((a % b) + b) % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  long long int a[n + 1];
  long long int sum[n + 1];
  sum[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  long long int sum1 = 0, sum2 = 0;
  long long int total = -1;
  pair<long long int, long long int> max = make_pair(-1, -1);
  pair<long long int, long long int> ans;
  for (int i = n - 2 * k; i >= 0; i--) {
    sum1 = sum[i + k] - sum[i];
    sum2 = sum[i + 2 * k] - sum[i + k];
    if (sum2 >= max.first) {
      max = make_pair(sum2, i + k);
    }
    if (sum1 + max.first >= total) {
      total = sum1 + max.first;
      ans = make_pair(i, max.second);
    }
  }
  cout << ans.first + 1 << " " << ans.second + 1 << endl;
}
