package yukicoder; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Q485 { static int N, D; static long K; static int[] x; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); D = sc.nextInt(); K = sc.nextInt(); x = new int[N]; for (int i = 0; i < N; ++i) { x[i] = sc.nextInt(); } RMQ rmq = new RMQ(N); for (int i = 0; i < N; ++i) { rmq.setVal(i, x[i], i); } long maxProfit = 0; int srcDay = -1, dstDay = -1; for (int i = 0; i < N - 1; ++i) { RMQ.State s = rmq.query(i + 1, i + 1 + D, 0, rmq.n, 0); if (maxProfit < (s.price - x[i]) * K) { maxProfit = (s.price - x[i]) * K; srcDay = i; dstDay = s.day; } } if (maxProfit == 0) { System.out.println(0); } else { System.out.println(maxProfit); System.out.println(srcDay + " " + dstDay); } } static class RMQ { class State implements Comparable { int day; long price; public State(int day, long price) { this.day = day; this.price = price; } @Override public int compareTo(State o) { if (price != o.price) { return -Long.compare(price, o.price); } else { return Long.compare(day, o.day); } } } int n; State[] val; long INF = Integer.MAX_VALUE / 10; public RMQ(int n_) { n = 1; while (n < n_) n *= 2; val = new State[2 * n - 1]; Arrays.fill(val, new State((int) INF, -INF)); } void setVal(int k, int price, int day) { k += n - 1; val[k] = new State(day, price); while (k > 0) { k = (k - 1) / 2; val[k] = max(val[2 * k + 1], val[2 * k + 2]); } } State query(int a, int b, int l, int r, int k) { if (b <= l || a >= r) return new State((int) INF, -INF); if (a <= l && r <= b) return val[k]; else { State vl = query(a, b, l, (l + r) / 2, 2 * k + 1); State vr = query(a, b, (l + r) / 2, r, 2 * k + 2); return max(vl, vr); } } State max(State s1, State s2) { if (s1.compareTo(s2) < 0) { return new State(s1.day, s1.price); } else { return new State(s2.day, s2.price); } } } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }