/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Main { public static void main (String[] args) throws java.lang.Exception { // your code goes here BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] line = br.readLine().split(" "); int N = Integer.parseInt(line[0]); int D = Integer.parseInt(line[1]); long K = Long.parseLong(line[2]); ArrayList map = new ArrayList(); for(int i=0;ians.getDiff()){ ans = tmp; i=ans.start; } } if(ans.getDiff()==0){ System.out.println(0); }else{ System.out.println(K*ans.getDiff()); System.out.println(ans.start + " " + ans.end); } } private static Ans calc(ArrayList map,int s,int d){ int min=Integer.MAX_VALUE,max=0; long min_c = Long.MAX_VALUE; long max_c = 0l; Ans ans = new Ans(); for(int i=s,size=map.size();i<=d&&i t){ min = i; min_c = t; } if(max_c < t){ max = i; max_c = t; ans.start = min; ans.start_c = min_c; ans.end = max; ans.end_c = max_c; } } return ans; } private static class Ans{ int start; long start_c; int end; long end_c; public long getDiff(){ return end_c-start_c; } } }