try while 0=0do let a=Array.init 10(fun _->Scanf.scanf"%d,"(fun i->i*2000))in Scanf.scanf"%d,%d
"(fun v w->let rec($)i z=if Array.fold_left(+)0a/(v+w)*v<=z+a.(i)then Printf.printf"%d
"(i+1)else(i+1)$(z+a.(i))in 0$0)done with _->()