Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

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

Fixed submission:
a, b, c, d = map(int, input().split())

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