import bisect def main(): N,D,K = map(int, input().split()) values = [int(input()) for i in range(N)] h_window = dcopy(values[:D]) h_window.sort() minimum = min(values[:D]) w_min_index = values[:D].index(minimum) min_index = values[:D].index(minimum) maximum = max(values[:D+1]) max_index = values[:D+1].index(maximum) MAX = maximum - minimum for j in range(D+1, N): del h_window[bisect.bisect_left(h_window, values[j-D-1])] if len(h_window) == 0: w_min_index = j-1 elif values[j-1] < h_window[0]: w_min_index = j-1 bisect.insort(h_window, values[j-1]) minimum = h_window[0] tmp = values[j] - minimum if tmp > MAX: MAX = tmp max_index = j min_index = w_min_index # print(MAX, min_index, max_index) if MAX <= 0: print(0) else: print(K*MAX) print(min_index, max_index)