/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 200 点
問題文
高橋君の町では D 日後に雪まつりが開かれます。雪まつりには雪が C センチメートル以上積もっている必要があります。
今朝の時点で、雪は A センチメートル積もっています。天気予報によると、これから毎晩ちょうど B センチメートルずつ雪が降り積もり、溶けることはありません。
D 日後の朝に雪が C センチメートル以上積もっているなら Yes を、そうでないなら No を出力してください。
制約
- 0 \leq A \leq 1000
- 0 \leq B \leq 1000
- 1 \leq C \leq 100000
- 1 \leq D \leq 100
- 入力はすべて整数
入力
入力は以下の形式で標準入力から与えられる。
A B C D
- 1 行目には、今朝の積雪 A 、 1 晩に積もる量 B 、必要な積雪 C 、雪まつりまでの日数 D がスペース区切りで与えられる。
出力
D 日後の朝に雪が C センチメートル以上積もっているなら Yes を、そうでないなら No を 1 行で出力せよ。
入力例 1
10 3 20 5
出力例 1
Yes
入力例 2
5 2 20 3
出力例 2
No
入力例 3
100 1 50 1
出力例 3
Yes
入力例 4
388 489 20948 19
出力例 4
No
入力例 5
114 910 34452 54
出力例 5
Yes
Score : 200 pts
Problem Statement
In Takahashi's town, a snow festival will be held in D days. The snow festival requires at least C centimeters of snow to be accumulated.
As of this morning, A centimeters of snow has accumulated. According to the weather forecast, exactly B centimeters of snow will fall and accumulate every night from now on, and none of it will melt.
If there is at least C centimeters of snow accumulated on the morning D days from now, print Yes; otherwise, print No.
Constraints
- 0 \leq A \leq 1000
- 0 \leq B \leq 1000
- 1 \leq C \leq 100000
- 1 \leq D \leq 100
- All input values are integers.
Input
The input is given from Standard Input in the following format:
A B C D
- In the first line, the snow accumulation this morning A, the amount accumulated per night B, the required snow accumulation C, and the number of days until the snow festival D are given, separated by spaces.
Output
If there is at least C centimeters of snow accumulated on the morning D days from now, print Yes; otherwise, print No in a single line.
Sample Input 1
10 3 20 5
Sample Output 1
Yes
Sample Input 2
5 2 20 3
Sample Output 2
No
Sample Input 3
100 1 50 1
Sample Output 3
Yes
Sample Input 4
388 489 20948 19
Sample Output 4
No
Sample Input 5
114 910 34452 54
Sample Output 5
Yes