N = 1 << 17 INF = 10 ** 9 n, d, K = map(int, input().split()) x = [int(input()) for _ in range(n)] dat = [(INF, INF)] * (N * 2) def seg_update(k, v): global dat dat[k + N] = (v, i) k += N while k > 1: dat[k >> 1] = min(dat[k], dat[k ^ 1]) k >>= 1 def seg_query(l, r): l += N r += N mn = (INF, INF) while l < r: if l & 1: mn = min(mn, dat[l]) l += 1 if r & 1: mn = min(mn, dat[r - 1]) l >>= 1 r >>= 1 return mn for i in range(n): seg_update(i, x[i]) opt = (0, 0, 0) for i in range(1, n): j = max(0, i - d) val = seg_query(j, i) opt = max(opt, (x[i] - val[0], -val[1], -i)) if opt[0] == 0: print(0) else: print(opt[0] * K) print(-opt[1], -opt[2])