import bisect
import time


n, d, k = map(int, input().split())
start = time.time()
if d >= n:
    print('NO')
else:
    deg = [0] * n
    ans = []
    free = []
    for i in range(d):
        deg[i] += 1
        deg[i + 1] += 1
        if deg[i] > k or deg[i + 1] > k:
            print("NO")
            exit()
        ans.append((i, i + 1))
    for i in range(1, d):
        bisect.insort_left(free, (max(i, d - i), i))
    for i in range(d + 1, n):
        while len(free) > 0 and deg[free[0][1]] == k:
            free.pop(0)
        if len(free) == 0 or free[0][0] == d:
            print('NO')
            exit()
        deg[i] += 1
        deg[free[0][1]] += 1
        ans.append((i, free[0][1]))
        bisect.insort_left(free, (free[0][0] + 1, i))
    print('YES')
    print(time.time() - start)
    # for i in range(len(ans)):
    #     print(ans[i][0] + 1, ans[i][1] + 1)
31.937401056289673
