INF=-1000000007 SQRT_N = 512 N,D,K = map(int,input().split()) x = [int(input()) for i in range(N)] b_size = (N + SQRT_N - 1) // SQRT_N bucket = [(INF,INF) for i in range(b_size * SQRT_N)] bucketMax = [(INF,INF) for i in range(b_size)] def query(left,right): ret = (INF,INF) for i in range(left // SQRT_N, right // SQRT_N + 1): l = i * SQRT_N r = (i+1) * SQRT_N if right <= l: break if r <= left or right <= l: continue if left <= l and r <= right: ret = max(ret,bucketMax[i]) else: s,t = max(left,l),min(right,r) ret = max(ret, max(bucket[s:t])) return ret for i in range(N): bucket[i] = (x[i],-i) for i in range(N): k = i // SQRT_N bucketMax[k] = max(bucketMax[k],bucket[i]) ans,pair = 0,() for i in range(N-1): ret = query(i+1,min(N,i+D+1)) if ans < ret[0]-x[i]: ans = ret[0]-x[i] pair = (i,-ret[1]) if ans <= 0: print(0) else: print(ans*K) print(' '.join([str(_) for _ in pair]))