x,y,z,*a=$<.read.split.map &:to_i b=[] (x-1).times do |i| b<< a[i+1..[i+y,x-1].min].max-a[i] end g=b.max if g<1 p 0 else p g*z puts [t=b.index(g),a[t..t+y].index(a[t]+g)].*" " end