import bisect def problem_input(): ndk = input().split() n = int(ndk[0], 10) d = int(ndk[1], 10) k = int(ndk[2], 10) xlist = [int(input(), 10) for i in range(n)] return n, d, k, xlist def test_input(): n = 7 d = 2 k = 1000 xlist = [1,3,5,1,4,4,7] return n, d, k, xlist def test_input1(): n = 5 d = 4 k = 100 xlist = [1,2,1,2,1] return n, d, k, xlist def test_input2(): n = 5 d = 1 k = 100 xlist = [5,4,3,3,1] return n, d, k, xlist # main n,d,k,xlist = problem_input() # n,d,k,xlist = test_input1() sorted_list = [(xlist[0], 0)] diff_max = 0 for i in range(1, n): while (i - sorted_list[0][1]) > d: sorted_list = sorted_list[1:] if diff_max < (xlist[i] - sorted_list[0][0]): diff_max = xlist[i] - sorted_list[0][0] result = (sorted_list[0][1], i) bisect.insort(sorted_list, (xlist[i], i)) print(diff_max * k) if diff_max != 0: print("{0} {1}".format(result[0], result[1]))