问题 DD: 胡萝卜蛋糕

内存限制:256 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:33 通过:11

题目描述

      在普莱里克斯的某些游戏中,烤箱烘烤k胡萝卜蛋糕需要t分钟,所有蛋糕在开始烘烤后t分钟在同一时刻准备好。阿尔卡迪至少需要n个蛋糕才能完成一项任务,但他目前没有。然而,他有无限多的食材和一个烤箱。此外,阿尔卡季可以再建造一个类似的烤箱以使过程更快,建造烤箱需要 d 分钟。在建造新烤箱时,只有旧烤箱才能烤蛋糕,新烤箱建成后,两个烤箱同时烘烤。阿尔卡迪不能建造一个以上的烤箱。

      确定建造第二个烤箱是否合理,即它是否会减少获得 n 个蛋糕所需的最短时间。如果第二个烤箱所需的时间与一个烤箱所需的时间相同,那么这是不合理的。

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.
Input
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.
Output
If it is reasonable to build the second oven, print "YES". Otherwise print "NO".
Examples
Input
8 6 4 5
Output
YES
Input
8 6 4 6
Output
NO
Input
10 3 11 4
Output
NO
Input
4 2 1 4
Output
YES
Note
In the first example it is possible to get 8 cakes in 12 minutes using one oven. The second oven can be built in 5 minutes, so after 6 minutes the first oven bakes 4 cakes, the second oven bakes 4 more ovens after 11 minutes. Thus, it is reasonable to build the second oven.
In the second example it doesn't matter whether we build the second oven or not, thus it takes 12 minutes to bake 8 cakes in both cases. Thus, it is unreasonable to build the second oven.
In the third example the first oven bakes 11 cakes in 3 minutes, that is more than needed 10. It is unreasonable to build the second oven, because its building takes more time that baking the needed number of cakes using the only oven.

输入格式

唯一的行包含四个整数 n, t, k, d (1≤n,t,k,d≤1000)− 所需的蛋糕数量,一个烤箱烘烤 k 个蛋糕所需的时间,同时烘烤的蛋糕数量,建造第二个烤箱所需的时间。

输出格式

如果建造第二个烤箱是合理的,请打印“YES”。否则打印“NO”。

输入 8 6 4 5

输出 YES

输入8 6 4 6

输出 NO

输入 10 3 11 4

输出 NO

输入4 2 1 4

输出 YES

样例解释:

在第一个示例中,使用一个烤箱可以在 12 分钟内获得 8 个蛋糕。第二个烤箱可以在 5 分钟内建成,所以 6 分钟后第一个烤箱烘烤 4 个蛋糕,第二个烤箱在 4 分钟后再烤 花费11 分钟。因此,建造第二个烤箱是合理的。

在第二个示例中,我们是否建造第二个烤箱并不重要,因此在这两种情况下烘烤 12 个蛋糕都需要 8 分钟。因此,建造第二个烤箱是不合理的。

在第三个示例中,第一个烤箱在 3 分钟内烘烤 11 个蛋糕,这比需要的 10 个多。建造第二个烤箱是不合理的,因为它的建造比使用唯一的烤箱烘烤所需数量的蛋糕需要更多的时间。

输入样例 复制

8 6 4 5

输出样例 复制

YES