Scanf.scanf "%d %d %d" (fun x y n -> let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in let rec loop i = if i = n - 1 then "YES" else ( if a.(i) * y > a.(i + 1) * x then "NO" else loop (i + 1) ) in loop 0 |> print_endline )