from heapq import * from collections import * import sys input = sys.stdin.readline class QuasiBinaryTree: def __init__(self, rule="min"): if rule == "max": self.pm = -1 else: self.pm = 1 self.inf = 10**18 self.P = [self.inf] self.Q = [] def insert(self, x): heappush(self.P, x * self.pm) def erase(self, x): heappush(self.Q, x * self.pm) def top(self): while self.Q and (self.P[0] == self.Q[0]): heappop(self.P) heappop(self.Q) return self.P[0] * self.pm N, D, K = map(int, input().split()) Q = [deque() for i in range(10**6+5)] T = QuasiBinaryTree() ansval, ansind = 0, None X = [0] * N for i in range(N): X[i] = int(input()) for i in range(N): T.insert(X[i]) Q[X[i]].append(i) if i >= D + 1: T.erase(X[i - D - 1]) Q[X[i - D - 1]].popleft() temp = X[i] - T.top() if temp > ansval: ansval = temp j = Q[T.top()][0] ansind = (j, i) if ansind: print(K * ansval) print(*ansind) else: print(0)