题库练习 Carrot Cakes
← 上一题 下一题 →

A10904 | Carrot Cakes

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

In some game by Playrix it takes $t$ minutes for an oven to bake $k$ carrot cakes, all cakes are ready at the same moment $t$ minutes after they started baking. Arkady needs at least $n$ cakes to complete a task, but he currently don't have any. However, he has infinitely many ingredients and one oven. Moreover, Arkady can build one more similar oven to make the process faster, it would take $d$ minutes to build the oven. While the new oven is being built, only old one can bake cakes, after the new oven is built, both ovens bake simultaneously. Arkady can't build more than one oven.

Determine if it is reasonable to build the second oven, i.e. will it decrease the minimum time needed to get $n$ cakes or not. If the time needed with the second oven is the same as with one oven, then it is unreasonable.

输入格式

The only line contains four integers $n$ , $t$ , $k$ , $d$ ( $1<=n,t,k,d<=1000$ ) — the number of cakes needed, the time needed for one oven to bake $k$ cakes, the number of cakes baked at the same time, the time needed to build the second oven.

输出格式

If it is reasonable to build the second oven, print "YES". Otherwise print "NO".

输入输出样例

输入 #1
8 6 4 5
输出 #1
YES
输入 #2
8 6 4 6
输出 #2
NO
输入 #3
10 3 11 4
输出 #3
NO
输入 #4
4 2 1 4
输出 #4
YES
C++ 编辑器
输入
输出