defmodule Main do def input, do: IO.read(:line) |> String.trim def ii, do: input() |> String.to_integer def li, do: input() |> String.split |> Enum.map(&String.to_integer/1) def yn(b), do: IO.puts (if b, do: "Yes", else: "No") def main do [_n, s, b] = li() h = li() init = Enum.at(h, 0) + s*b Enum.reduce_while(h, init, fn x, acc -> if acc < x do {:halt, -1} else {:cont, max(acc, x + s*b)} end end) |> then(fn x -> x > 0 end) |> yn() end end