eval"N,*L,K="+$<.read.split*?, p (0..M=L.sum/K+1.0).bsearch{|i|L.map{|l|l.div i}.sum