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 ≤ 1 000) — 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.

Difficulty: competition

Starter code:

Solutions:
import collections as col
import itertools as its
import sys
import operator
from bisect import bisect_left, bisect_right
from copy import copy, deepcopy
from math import factorial as fact


class Solver:
    def __init__(self):
        pass

    def solve(self):
        n, t, k, d = list(map(int, input().split()))
        n = (n + k - 1) // k
        if d < (n-1) * t:
            print('YES')
        else:
            print('NO')


def __starting_point():
    s = Solver()
    s.solve()

__starting_point()

n, t, k, d = [int(i) for i in input().split()]

n = (n+k-1)//k

t0 = t * n

dt = t0 - d
ans = "YES" if dt > t else "NO"

print(ans)

n, t, k, d = map(int, input().split())
ans1 = n // k
if n % k:
    ans1 += 1
ans1 *= t
if d < ans1 - t:
    print("YES")
else:
    print("NO")

n, t, k, d = list(map( int, input().split() ))
clk = 0
s = 0
while s < n:
  s += k
  clk += t
clk2 = 0
lb, ub = 0, int( 1e10 )
while lb <= ub:
  mid = lb + ub >> 1
  s = mid // t * k + max( 0, mid - d ) // t * k
  if s >= n:
    clk2 = mid
    ub = mid - 1
  else:
    lb = mid + 1

print( [ "NO", "YES" ][ clk > clk2 ] )


n, t, k, d = list(map(int, input().split()))

# t1 = (n // k + n % k == 0 ? 0 : 1) * t
p = (d // t) * k
if n - p > k:
	print("YES")
else:
	print("NO")

3

def time1(n, t, k):
    return ((n + k - 1) // k) * t


def num2(T, t, k, d):
    return (T // t) * k + max(0, (T - d) // t) * k

def time2(n, t, k, d):
    l, r = 0, 10 ** 18
    while l < r - 1:
        mid = (l + r) // 2
        if num2(mid, t, k, d) < n:
            l = mid
        else:
            r = mid
    return r

n, t, k, d = list(map(int, input().split()))
if time1(n, t, k) <= time2(n, t, k, d):
    print("NO")
else:
    print("YES")
    


#!/usr/bin/env python3

def main():
    n, t, k, d = list(map(int, input().split()))
    method_a = (n + k - 1) // k * t
    done = 0
    i = 0
    a_progress = b_progress = 0
    while done < n:
        a_progress += 1
        if a_progress == t:
            a_progress = 0
            done += k
        if d > 0:
            d -= 1
        else:
            b_progress += 1
            if b_progress == t:
                b_progress = 0
                done += k
        i += 1

    print("YES" if i < method_a else "NO")

try:
    while True:
        main()
except EOFError:
    pass


def bp1(time):
    return (time // t) * k


def bp2(time):
    return (time // t) * k  + (max(time - d, 0) // t) * k


n, t, k, d = map(int, input().split())

l = 0
r = 10 ** 9
while l < r - 1:
    m = (l + r) // 2
    if bp1(m) >= n:
        r = m
    else:
        l = m
ans1 = r


l = 0
r = 10 ** 9
while l < r - 1:
    m = (l + r) // 2
    if bp2(m) >= n:
        r = m
    else:
        l = m
ans2 = r

if ans2 < ans1:
    print('YES')
else:
    print('NO')

n,t,k,d=map(int,input().split())
ans=0
i=0
while ans<n:
    i+=1
    if i%t==0: ans+=k
    if i-d>0 and (i-d)%t==0 and ans<n: print('YES'); break
else: print('NO')

n, t, k, d = map(int, input().split())
t1 = ((n + k - 1) // k) * t
if t1 <= d:
    print("NO")
elif ((n - 1) // k) * t > d:
    print("YES")
else:
    print("NO")

n, t, k, d = map(int, input().split())

first = (n // k)
if n % k != 0: first += 1

first = first * t

left = -1
right = int(1e9)
while right - left > 1:
	mid = (left + right) // 2

	one = (mid // t) * k
	two = (max(mid - d, 0) // t) * k
	if one + two >= n:
		right = mid
	else:
		left = mid


if right != first:
	print('YES')
else:
	print('NO')

#!/usr/bin/env python3
from sys import stdin,stdout

def readint():
    return list(map(int, stdin.readline().split()))
#lines = stdin.readlines()

n, t, k, d = readint()

tt = (n//k)*t
if n%k:
    tt += t

if tt > d+t:
    print("YES")
else:
    print("NO")



from fractions import Fraction as F
from math import ceil, floor
n, t, k, d = map(int,input().split())

single = t*ceil(F(n,k))
double1 = k*floor(F(single-1,t))
double2 = max(0, k*floor(F(single-d-1,t)))
print("YES" if double1+double2 >= n else "NO")

import math 
def main():
    n,t,k,d = list(map(int, input().split()))

    if d+t < math.ceil(n/k)*t:
        print("YES")
    else:
        print("NO")



def __starting_point():
    # nonlocal stime
    # stime = time.clock()
    main()

__starting_point()

n, t, k, d = map(int, input().split())
ans1 = (n + k - 1) // k * t

ans2 = 1 << 30
for x in range(1, 1000010):
    if ((d + x) // t + x // t) * k >= n:
        ans2 = d + x
        break

if ans1 <= ans2:
    print("NO")
else:
    print("YES")

n, t, k, d = map(int, input().split())

whenD = (d // t) * k
if n - whenD <= k:
    print('NO')
else:
    print("YES")

n,t,k,d=[int(x) for x in input().split()]
c=n//k+(n%k>0)
print('YES' if (c-1)*t>d else 'NO')

import math
n,t,k,d = map(int, input().split())

t1 = math.ceil(n / k)*t
if t1 - d > t:
    print('YES')
else:
    print('NO')

def sing(n, t, k):
    have = 0
    q = [t]
    last = 0

    while have < n:
        last = q[0]
        q.append(q[0] + t)
        q = q[1:]
        have += k

        q.sort()

    return last

def getdouble(n, t, k, d):
    have = 0
    q = [t, d + t]
    last = 0

    while have < n:
        last = q[0]
        q.append(q[0] + t)
        q = q[1:]
        have += k

        q.sort()

    return last

def main():
    n, t, k, d = list(map(int, input().split()))
    single = (n + k - 1) // k
    single *= t
    single = sing(n, t, k)
    double = getdouble(n, t, k, d)

    print('YES' if double < single else 'NO')

main()


n,t,k,d=map(int,input().split())
print("YES" if ((d+t)//t)*k<n else "NO")

while True:
    try:
        n, t, k, d = list(map(int, input().split()))
        from math import ceil
        print("YES" if ceil(n/k)*t > t+d else "NO")
    except EOFError:
        break


import sys

def solve():
    n, t, k, d = map(int, input().split())

    use = (n + k - 1) // k

    if d < (use - 1) * t:
        ans = 'YES'
    else:
        ans = 'NO'

    print(ans)

def __starting_point():
    solve()
__starting_point()

n, t, k, d = list(map(int, input().split()))
n = (n // k) + (1 if n % k else 0)
# if d % t != 0:
#     d += t - d % t

# print(n, d, t)
print("YES" if d < (n - 1) * t else "NO")


import math

n, t, k, d = list(map(int, input().split()))

time = t * math.ceil(n / k)
cnt = ((time - 1) // t + max(0, time - 1 - d) // t) * k

print('YES' if cnt >= n else 'NO')


n, t, k, d = list(map(int, input().split()))
cakes = ((d + t) // t) * k
if cakes < n:
    print("YES")
else:
    print("NO")