101641: [AtCoder]ABC164 B - Battle

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $200$ points

Problem Statement

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, print No.

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, print No.


Sample Input 1

10 9 10 10

Sample Output 1

No

First, Takahashi's monster attacks Aoki's monster, whose health is now $10-9=1$.

Next, Aoki's monster attacks Takahashi's monster, whose health is now $10-10=0$.

Takahashi's monster is the first to have $0$ or less health, so Takahashi loses.


Sample Input 2

46 4 40 5

Sample Output 2

Yes

Input

题意翻译

A、B两人在电脑游戏中分别操控甲、乙两只怪物互相攻击。在一开始的时候,甲的体力值为 $a$ ,攻击力为 $b$ ;乙的体力值为 $c$ ,攻击力为 $d$ 。现在两只怪物**从甲开始轮流向对方发动攻击**(指将对方的体力值减去自己的攻击力),直到有一方的体力值降至 $0$ 及以下。一方攻击过后,如果对方的体力值降至 $0$ 及以下,则己方胜出。输入 $a,b,c,d$ ,输出游戏结果。如果A赢了,输出Yes;如果B赢了,输出No。

加入题单

上一题 下一题 算法标签: