100 atcoder#ABC191A. [ABC191A] Vanishing Pitch
[ABC191A] Vanishing Pitch
Score : points
Problem Statement
Takahashi and Aoki are playing baseball. Takahashi is the pitcher, and Aoki is the batter. Takahashi can throw an invisible pitch. When he throws it, the ball moves linearly at a constant speed , and it becomes invisible between the moment seconds after throwing and the moment seconds after throwing (inclusive). The ball keeps moving when it is invisible. If the ball is not invisible at the moment the ball is exactly away from Takahashi, Aoki can hit the ball. Otherwise, he cannot hit it. Can Aoki hit the ball?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If Aoki can hit the ball, print Yes
; otherwise, print No
.
10 3 5 20
Yes
The ball is exactly away from Takahashi at seconds after throwing. On the other hand, the ball becomes invisible between and seconds (inclusive) after throwing, so Aoki can hit the ball.
10 3 5 30
No
Note that the ball is also invisible at seconds and seconds after throwing. Here, the ball is exactly away from Takahashi at seconds after throwing, so the ball is invisible and cannot be hit by Aoki.