import sys import io, os input = sys.stdin.buffer.readline #input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline n, d, k = map(int, input().split()) X = [(int(input()), i) for i in range(n)] class SegTree: def __init__(self, init_val, ide_ele, segfunc): self.n = len(init_val) self.num = 2**(self.n-1).bit_length() self.ide_ele = ide_ele self.segfunc = segfunc self.seg = [ide_ele]*2*self.num # set_val for i in range(self.n): self.seg[i+self.num] = init_val[i] # built for i in range(self.num-1, 0, -1): self.seg[i] = self.segfunc(self.seg[2*i], self.seg[2*i+1]) def update(self, k, x): k += self.num self.seg[k] = x while k: k = k >> 1 self.seg[k] = self.segfunc(self.seg[2*k], self.seg[2*k+1]) def query(self, l, r): if r <= l: return self.ide_ele l += self.num r += self.num res = self.ide_ele while l < r: if r & 1: r -= 1 res = self.segfunc(res, self.seg[r]) if l & 1: res = self.segfunc(res, self.seg[l]) l += 1 l = l >> 1 r = r >> 1 return res def segfunc(x, y): if x[0] > y[0]: return x elif x[0] < y[0]: return y else: if x[1] < y[1]: return x else: return y seg = SegTree(X, (-1, -1), segfunc) M = 0 for l in range(n): r = min(l+d, n-1) s, t = seg.query(l, r+1) temp = k*(s-X[l][0]) if temp > M: M = temp ans = (l, t) if M != 0: print(M) print(*ans) else: print(M)