#include using namespace std; #define FOR(i,l,r) for(int i = (int) (l);i < (int) (r);i++) #define ALL(x) x.begin(),x.end() template bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; } template bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; } typedef long long ll; int N,D; ll K; const ll INF = 1e17; int main() { scanf("%d%d%lld",&N,&D,&K); vector A(N); FOR(i,0,N){ scanf("%lld",&A [i]); } deque mx; ll ans = -INF; pair idx; int r = 0; FOR(i,0,N){ while(r < i + D + 1 && r < N){ while(mx.empty() == false && A [mx.back()] < A [r]){ mx.pop_back(); } mx.push_back(r); r++; } if(mx.empty() == false && mx.front() == i) mx.pop_front(); if(mx.empty() == false && chmax(ans,(A [mx.front()] - A [i]) * K)){ idx = {i,mx.front()}; } } if(ans <= 0){ printf("0\n"); } else{ printf("%lld\n",ans); printf("%d %d\n",idx.first,idx.second); } return 0; }