eval'N,*L,K='+`dd`.split*?, p (0..1e9).bsearch{|i|L.map{|l|l.div i}.sum