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.
a, b, c, d = map(int, input().split())


if a <= b <= c and b - a <= d and c - b <= d:
    print('YES')

elif a >= b >= c and a - b <= d and b - c <= d:
    print('YES')

elif a >= c and a - c <= d:
    print('YES')

elif a <= c and c - a <= d:
    print('YES')

else:
    print('NO')
a, b, c, d = map(int, input().split())

if a >= c:
    if a - c <= d:
        print('Yes')
    elif a >= b >= c and a - b <= d and b - c <= d:
        print('Yes')
    else:
        print('No')

else:
    if c - a <= d:
        print('Yes')
    elif a <= b <= c and b - a <= d and c - b <= d:
        print('Yes')
    else:
        print('No')
