using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; using System.IO; class Program { static void Main(string[] args) { new Magatro().Solve(); } } public class Magatro { private int N, D, K; private int[] X; private int[] Table; private int[] Index; private const int T = 1000; private void Scan() { string[] line = Console.ReadLine().Split(' '); N = int.Parse(line[0]); D = int.Parse(line[1]); K = int.Parse(line[2]); X = new int[N]; Table = new int[(N + T - 1) / T]; Index = new int[(N + T - 1) / T]; for (int i = 0; i < N; i++) { X[i] = int.Parse(Console.ReadLine()); if (Table[i / T] < X[i]) { Table[i / T] = X[i]; Index[i / T] = i; } } } public void Solve() { Scan(); int ans = 0; int ansL = -1, ansR = -1; for (int i = 0; i < N - 1; i++) { int right = Math.Min(i + D, N - 1); int max = 0; int r = -1; for (int j = i + 1; j <= right && j % T <= T - 1; j++) { if (max < X[j]) { max = X[j]; r = j; } } for (int j = i / T + 1; j < right / T; j++) { if (max < Table[j]) { max = Table[j]; r = Index[j]; } } for (int j = right; j >= i && j % T != T - 1; j--) { if (max <= X[j]) { max = X[j]; r = j; } } if (ans < max - X[i]) { ans = max - X[i]; ansL = i; ansR = r; } } Console.WriteLine((long)ans * K); if(ans == 0) { return; } Console.WriteLine($"{ansL} {ansR}"); } }