#include using namespace std; typedef long long int ll; typedef unsigned long long ull; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll myRand(ll B) { return (ull)rng() % B; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n,d; cin >> n >> d; ll K; cin >> K; vector x(n); for(int i=0;i> x[i]; } deque> dq; ll res=0; int rj=0,rk=0; for(int i=0;ires){ res=c; rj=dq.front().second; rk=i; } else if(c==res){ int j=dq.front().second; if(rj>j){ rj=j; rk=i; } } } while(dq.size() and dq.back().first>x[i])dq.pop_back(); dq.push_back(make_pair(x[i],i)); } res*=K; printf("%lld\n",res); if(res>0)printf("%d %d\n",rj,rk); }