Three people, A, B and C, are trying to communicate using transceivers. They are standing along a number line, and the coordinates of A, B and C are a, b and c (in meters), respectively. Two people can directly communicate when the distance between them is at most d meters. Determine if A and C can communicate, either directly or indirectly. Here, A and C can indirectly communicate when A and B can directly communicate and also B and C can directly communicate.
arr = list(map(int, input().split()))
print(arr)
if abs(arr[0] - arr[2]) > arr[3]:
    if abs(arr[0] - arr[1]) > arr[3] or abs(arr[1] - arr[2]) > arr[3]:
        print("No")
    else:
        print("No")
else:
    print("Yes")

arr = list(map(int, input().split()))


def canSpeak(a, b):
    return abs(a - b) <= arr[3]


if canSpeak(arr[0], arr[2]) or (canSpeak(arr[0], arr[1]) and canSpeak(arr[1], arr[2])):
    print("Yes")
else:
    print("No")
