Takahashi and Aoki will have a battle using their monsters. The health and strength of…
- User
Takahashi and Aoki will have a battle using their monsters.
The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.
The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.
If Takahashi will win, print
Yes; if he will lose, printNo.Constraints
- 1 \leq A,B,C,D \leq 100
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
A B C D
Output
If Takahashi will win, print
Yes; if he will lose, printNo.Examples
Input
10 9 10 10
Output
No
Input
46 4 40 5
Output
Yes
Assistant
pythonA, B, C, D = map(int, input().split()) t_health = A a_health = C while True: # Takahashi's attack a_health -= B if a_health <= 0: print("Yes") exit() # Aoki's attack t_health -= D if t_health <= 0: print("No") exit()
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.