#K58652. Scooter Delivery Trip

    ID: 30690 Type: Default 1000ms 256MiB

Scooter Delivery Trip

Scooter Delivery Trip

You are given a scooter with a limited battery range. Your task is to determine whether the scooter can complete a round trip from the company base to a customer's house and back without recharging.

The scooter is characterized by four parameters:

  • s: the maximum speed in km/h (provided for context, but not used in calculations).
  • a: the acceleration rate in km/h² (provided for context, but not used in calculations).
  • b: the battery range in km.
  • d: the one-way distance from the base to the customer's house in km.

The scooter will successfully complete the delivery if the total distance (i.e. 2d) does not exceed its battery range b. Formally, the condition is expressed in LaTeX as:

\(2d \leq b\)

If the condition satisfies, output YES; otherwise, output NO.

inputFormat

The input is given via standard input (stdin) and consists of a single line containing four space-separated integers: s, a, b, and d.

outputFormat

Output a single line to standard output (stdout): YES if the scooter can complete the round trip without recharging, and NO otherwise.## sample

20 5 50 15
YES