#include <bits/stdc++.h>
using namespace std;

long long a[100005];

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    freopen("BAIHAT.INP","r",stdin);
    freopen("BAIHAT.OUT","w",stdout);
    int n, k;
    cin >> n >> k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    long long sum=0;
    for (int i = 1; i <= k; i++) sum+=a[i];
    long long ans=sum;
    int u=1,v=k;
    for (int i=k+1; i<=n; i++)
    {
        sum=sum-a[i-k]+a[i];
        if (sum>ans)
        {
            ans=sum;
            u=i-k+1;
            v=i;
        }
    }
    cout <<u<<' '<<v<<' '<<ans;
    return 0;
}
