N,D,K=gets.split.map &:to_i a=N.times.map{gets.to_i} c=1 min=a[0] v=0 b=[a[0]] x=y=z=0 i,j=0,1 while jD if a[i]==min c-=1 if c==0 b=a[i+1,D] min=b.min c=b.count(min) v=b.index(min)+i+1 end end i+=1 end if a[j]z z=a[j]-min x=v y=j end j+=1 end p z*K puts "#{x} #{y}" if z>0