ZhenlongDai/ACPR huggingface dataset:
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
d1 = a-b; d2 = c-b; d3 = a-c

if d1 < 0:
    d1 = -d1
if d2 < 0:
    d2 = -d2 
if d3 < 0:
    d3 = -d3

if d1 <= d and d2 <= d and d3 <= d:
    print('Yes')
else:
    print('No')

Failing test case input:
-1 100 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
d1 = a-b; d2 = c-b; d3 = a-c

if d1 < 0:
    d1 = -d1
if d2 < 0:
    d2 = -d2 
if d3 < 0:
    d3 = -d3

if d1 <= d and d2 <= d or d3 <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
print('Yes' if c-a<=d or (b-a<=d and c-b<=d) else 'No')

Failing test case input:
3 110 1 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
print('Yes' if abs(c-a)<=d or (abs(b-a)<=d and abs(c-b)<=d) else 'No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x=map(int,input().split())
if abs(a-c)<=x:
  print("Yes")
elif abs(a-b)<=x and abs(a-c)<=x:
  print("Yes")
else:
  print("No")

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,x=map(int,input().split())
if abs(a-c)<=x:
  print("Yes")
elif abs(a-b)<=x and abs(b-c)<=x:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')

Failing test case input:
2 011 0 -1

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
count = 0
if(a-b <= d and b-a <= d):
    count +=1
if(b-c <= d and c-b <= d):
    count += 1
if(c-a <= d and a-c <= d):
    count += 1
if count >= 2:
    print("Yes")
else:
    print("No")

Failing test case input:
2 101 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
lst = sorted([a,b,c])
if(lst[1] - lst[0] <= d and lst[2] - lst[1] <= d):
    print("Yes")
else:
    if(a-c <= d and c-a <= d):
        print("Yes")
    else:
        print("No")
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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


Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int,input().split())
if abs(a-b)<=d or abs(b-c)<=d:
  print("YES")
elif abs(a-b)<=d and abs(b-c)<=d:
  print("Yes")
else:
  print("No")

Failing test case input:
-2 010 -1 24

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
a, b, c, d = map(int,input().split())
if (abs(a-b)<=d and abs(b-c)<=d) or abs(a-c)<=d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

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







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

Failing test case input:
-1 011 1 81

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):






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








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

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

a,b,c,d = map(int,input().split())
print("Yes" if (abs(a-b)<=d and abs(c-b)<=d)  else "No")

Failing test case input:
1 100 2 10

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):

a,b,c,d = map(int,input().split())
print("Yes" if (abs(a-b)<=d and abs(c-b)<=d) or (abs(a-c)<=d)  else "No")

Problem: p03351
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,c,d =[int(x) for x in input().split()]
print("No" if c-b>d or b-a>d else "Yes")

Failing test case input:
-1 101 2 50

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d =[int(x) for x in input().split()]
print("No" if abs(c-a)>d and (abs(c-b)>d or abs(b-a)>d) else "Yes")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if abs(a-c) < d:
  print('Yes')
elif abs(a-b) < d and abs(b-c) < d:
  print('Yes')
else:
  print('No')

Failing test case input:
2 110 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if abs(a-c) <= d:
  print('Yes')
elif abs(a-b) <= d and abs(b-c) <= d:
  print('Yes')
else:
  print('No')
Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a , b, c , d = map(int,input().split())
if abs(a - b ) <= d and abs(b - c) <= d :
  print('Yes')
elif abs(a -c) > d:
  print('Yes')
else:
  print('No')


Failing test case input:
2 111 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a , b, c , d = map(int,input().split())
if abs(a - b ) <= d and abs(b - c) <= d :
  print('Yes')
elif abs(a -c) <= d:
  print('Yes')
else:
  print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list1 = [int(a) for a in input().split()]
m_a = list1[0] 
m_b = list1[1] 
m_c = list1[2] 
m_d = list1[3] 

m_e = abs(m_a - m_c)

if m_e <= m_d:
    print("Yes")
else:
    print("No")

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
list1 = [int(a) for a in input().split()]
m_a = list1[0] 
m_b = list1[1] 
m_c = list1[2] 
m_d = list1[3] 

if abs(m_a - m_c) <= m_d:
    print("Yes")
elif abs(m_b - m_c) <= m_d:
    if abs(m_b - m_a) <= m_d:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

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


Failing test case input:
1 001 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())

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

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))
if (abs(a[0]-a[2]) < a[3]) or ((abs(a[0] - a[1]) < a[3]) and (abs(a[1] -a[2]) < a[3])):
  print("Yes")
else:
  print("No")

Failing test case input:
2 100 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
if (abs(a[0]-a[2]) <= a[3]) or ((abs(a[0] - a[1]) <= a[3]) and (abs(a[1] -a[2]) <= a[3])):
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

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

Failing test case input:
4 111 0 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):


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

if abs(b-a) <= d and abs(c-b) <= d:
    print("Yes")
elif abs(c-a) <= d:
    print("Yes")
else:
    print("No")
Problem: p03351
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())

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

Failing test case input:
-1 100 0 24

Expected output:
Yes


Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())

ab = abs(a - b)
bc = abs(b - c)
ca = abs(c - a)

if(ab < d and bc < d and ca < d):
  print("Yes")
else:
  print("No")
    



Failing test case input:
-1 101 3 50

Expected output:
Yes


Actual output:
No


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

ab = abs(a - b)
bc = abs(b - c)
ca = abs(c - a)

if(ab <= d and bc <= d or ca <=d):
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if abs(a-b) <= d and abs(b-c) <= d  and abs(a-c) <= d:
  print("Yes")
else:
  print("No")

Failing test case input:
-1 111 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if (abs(a-b) <= d and abs(b-c) <= d) or abs(a-c) <= d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if abs(a-c)<d:
    print("Yes")
else:
    if abs(a-b)<d and abs(b-c)<d:
        print("Yes")
    else: print("No")
        

Failing test case input:
2 000 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
    print("Yes")
else:
    if abs(a-b)<=d and abs(b-c)<=d:
        print("Yes")
    else: print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
ab = abs(a - b)
bc = abs(b - c)
if ab <= d and bc <= d:
  print('Yes')
else:
  print('No')

Failing test case input:
-1 100 -2 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
ab = abs(a - b)
bc = abs(b - c)
ac = abs(a - c)
if ab <= d and bc <= d:
  print('Yes')
elif ac <= d:
  print('Yes')
else:
  print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
e=abs(a-b)
f=abs(b-c)
if e>=d and f>=d:
  print("Yes")
else:
  print("No")

Failing test case input:
4 111 1 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
e=abs(a-b)
f=abs(b-c)
g=abs(a-c)
if g>d and (e>d or f>d):
  print("No")
else:
  print("Yes")
Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

def main():
    a, b, c, d = map(int, input().split())
    if a - c <= d or ((a - b) <= d and (b - d) <= d):
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()


Failing test case input:
0 011 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

def main():
    a, b, c, d = map(int, input().split())
    if abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
if (abs(a-b)<d)&(abs(b-c)<d):
    print("Yes")
elif (abs(a-c)<d):
    print("Yes")
else:
    print("No")

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
if (abs(b-a)<=d)&(abs(c-b)<=d):
    print("Yes")
elif (abs(c-a)<=d):
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if (b-c <= d and c-b <= d) or c-a <= d :
    print('Yes')
else:
    print('No')


Failing test case input:
4 111 1 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if (abs(b-a) <= d and abs(c-b) <= d) or abs(c-a) <= d :
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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

Failing test case input:
0 001 0 -1

Expected output:
No


Actual output:
Yes


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if abs(a-b)<=d and abs(b-c)<=d:
    print("Yes")
else:
    print("No")


Failing test case input:
0 111 2 81

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
    print("Yes")
elif abs(a-b)<=d and abs(b-c)<=d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())

1 <= a,b,c,d <= 100

if abs(a-b) <= d or abs(b-c) <= d:
    result = ("Yes")
else:
    result = ("No")

print(result)

Failing test case input:
0 111 2 50

Expected output:
Yes


Actual output:
No


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

1 <= a,b,c,d <= 100

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

print(result)
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if abs(a-b) <= d and abs(b-c) <= d:
    print('YES')
elif abs(a-c) <= 10:
    print('YES')
else:
    print('NO')

Failing test case input:
-1 011 5 8

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if abs(a-b) <= d and abs(b-c) <= d:
    print('Yes')
elif abs(a-c) <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
if (a-b<d)&(b-c<d):
    print("Yes")
elif (a-c<d):
    print("Yes")
else:
    print("No")

Failing test case input:
0 111 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
if (abs(b-a)<=d)&(abs(c-b)<=d):
    print("Yes")
elif (abs(c-a)<=d):
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int,input().split())
if (abs(a-b)<=d and abs(b-c)<=d) or abs(a-c)<=d:
  print("YES")

else:
  print("No")

Failing test case input:
0 010 -1 24

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
a, b, c, d = map(int,input().split())
if (abs(a-b)<=d and abs(b-c)<=d) or abs(a-c)<=d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

if 2 * d >= abs(c - a):
    print('Yes')
else:
    print('No')


Failing test case input:
0 111 5 3

Expected output:
No


Actual output:
Yes


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())

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

Failing test case input:
2 001 1 1

Expected output:
Yes


Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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

Failing test case input:
4 111 1 -3

Expected output:
No


Actual output:
Yes


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
print("Yes" if b-a<=d and c-b<=d else "No" )

Failing test case input:
-1 100 -1 15

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
print("Yes" if (abs(b-a)<=d and abs(c-b)<=d) or abs(c-a)<=d else "No" )
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())
if c-a <= d:
  print("Yes")
elif b-a <= d and c-b <= d:
  print("Yes")
else:
  print("No")

Failing test case input:
2 010 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())
if max(a,c) - min(a,c) <= d:
  print("Yes")
elif max(a,b) - min(a,b) <= d and max(b,c)-min(b,c) <= d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())

if abs(c-a) <= d:
  print("YES")
else:
  if abs(b-a) <= d and abs(c-b) <= d:
    print("YES")
  else:
    print("NO")

Failing test case input:
-3 010 -1 24

Expected output:
Yes


Actual output:
YES


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
print("Yes" if abs(a-b)<=d and abs(b-c)<=d else "No")

Failing test case input:
2 100 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = input().split()
if abs(int(l[2]) - int(l[1])) > int(l[3]):
    print("Yes")
elif abs(int(l[0]) - int(l[1])) > int(l[3]) and abs(int(l[1]) - int(l[2])) > int(l[3]):
    print("Yes")
else:
    print("No")

Failing test case input:
0 000 1 35

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
l = input().split()
if abs(int(l[2]) - int(l[0])) <= int(l[3]):
    print("Yes")
elif abs(int(l[0]) - int(l[1])) <= int(l[3]) and abs(int(l[1]) - int(l[2])) <= int(l[3]):
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
data = input()

dataa,datab,datac,datad = data.split(' ')

dataa = int(dataa)
datab = int(datab)
datac = int(datac)
datad = int(datad)

length1 = dataa -datab + datab - datac
length2 = dataa - datac

if length1 < datad:
    print('Yes')
elif length2 < datad:
    print('Yes')
else:
    print('No')


Failing test case input:
1 111 0 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
data = input()
data1,data2,data3,data4 = data.split()
data1 = int(data1)
data2 = int(data2)
data3 = int(data3)
data4 = int(data4)


if abs(data1 - data3) <= data4:
    print('Yes')
elif abs(data1 - data2) <= data4 and abs(data2 - data3) <= data4:
    print('Yes')
else:
    print('No')
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
if abs(a-b)<=d and abs(c-b)<=d:
    print('Yes')
else:
    print('No')

Failing test case input:
-1 100 -1 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
if abs(a-b)<=d and abs(c-b)<=d:
    print('Yes')
elif abs(c-a)<=d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())
print('YES' if abs(a-c)<=d or abs(a-b)<=d and abs(b-c)<=d else 'No')

Failing test case input:
1 111 0 1

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())
print('Yes' if abs(a-c)<=d or abs(a-b)<=d and abs(b-c)<=d else 'No')

Problem: p03351
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if b-a<=d and c-b<=d:
    print("Yes")
else:print("No")


Failing test case input:
1 111 0 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if (abs(b-a)<=d and abs(c-b)<=d) or abs(c-a)<=d:
    print("Yes")
else:print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())
if abs(a-b)<= d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')

Failing test case input:
-1 100 -1 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())
if (abs(a-b)<= d and abs(b-c)<=d) or abs(a-c)<=d:
  print('Yes')
else:
  print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if abs(a-b) <= d and abs(b-c) <= d:
  print("Yes")
else:
  print("No")

Failing test case input:
-1 101 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if (abs(a-b) <= d and abs(b-c) <= d) or abs(a-c) <= d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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

Failing test case input:
1 111 0 1

Expected output:
Yes


Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int, input().split())
if abs(b-a) <= d and abs(c-b) <= d:
  print("Yes")
else:
  print("No")

Failing test case input:
-1 100 -1 15

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int, input().split())
if abs(b-a) <= d and abs(c-b) <= d or abs(c-a) <= d:
  print("Yes")
else:
  print("No")
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
print('Yes' if abs(a-b)<=d and abs(b-c)<=d else 'No')

Failing test case input:
0 111 0 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
print('Yes' if abs(a-b)<=d and abs(b-c)<=d or abs(a-c)<=d else 'No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if abs(a-b)>abs(a-c):
  if abs(a-b)<=d and abs(b-c)<=d:
    print('Yes')
  else:
    print('No')
else:
  if abs(a-c)<= d:
    print('Yes')
  else:
    print('No')


Failing test case input:
-1 100 -1 13

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if abs(a-b) <abs(a-c):
  if abs(a-b)<=d and abs(b-c)<=d:
    print('Yes')
  else:
    print('No')
else:
  if abs(a-c)<= d:
    print('Yes')
  else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
print('Yes' if abs(a-b)<=d or abs(a-c)<=d and abs(c-b)<=d else 'No')

Failing test case input:
1 111 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
print('Yes' if abs(c-a)<=d or abs(b-a)<=d and abs(c-b)<=d else 'No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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

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

elif 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')
    
else:
    print('NO')

Failing test case input:
0 111 0 0

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
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')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if a+c<=d or (a+b<=d and b+c<=d):
  print("Yes")
else:
  print("No")

Failing test case input:
4 7 2 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(c-a)<=d or (abs(a-b)<=d and abs(b-c)<=d):
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())

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

Failing test case input:
2 101 1 1

Expected output:
Yes


Actual output:
No


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

if abs(a-b) <= d and abs(b-c) <= d or abs(a-c) <=d:
  print('Yes')
else:
  print('No')
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if b-a<=d and c-b<=d:
  print("Yes")
elif c-a<=d:
  print("Yes")
else:
  print("No")

Failing test case input:
3 001 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(b-a)<=d and abs(c-b)<=d:
  print("Yes")
elif abs(c-a)<=d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())

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

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if abs(a-b)<=d and abs(c-b)<=d:
    print("Yes")
else:
    print("No")

Failing test case input:
0 101 5 12

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
    print("Yes")
else:
    if abs(a-b)<=d and abs(c-b)<=d:
        print("Yes")
    else:
        print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if abs(a-b)<=d and abs(b-c)<=d:
  print("Yes")
else:
  print("No")

Failing test case input:
2 101 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(a-b)<=d and abs(b-c)<=d:
  print("Yes")
elif abs(a-c)<=d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
if max(abs(b-a),abs(c-b)) <= d:
  print("Yes")
else:
  print("No")

Failing test case input:
-1 101 3 50

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
if (max(abs(b-a),abs(c-b)) <= d) or abs(c-a) <= d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = (int(i) for i in input().split())

dab = (a-b)**2
dac = (a-c)**2
dbc = (b-c)**2

if dac <= d**2:
    print("Yes")
elif (dab - dbc)**2 <= d**4:
    print("Yes")
else: print("No")

Failing test case input:
2 001 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math

a, b, c, d = (int(i) for i in input().split())

dab = math.sqrt((a-b)**2)
dac = math.sqrt((a-c)**2)
dbc = math.sqrt((b-c)**2)

if dac <= d:
    print("Yes")
elif dab <= d and dbc <= d:
    print("Yes")
else:
    print("No")
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
a,b,c,d = [int(num) for num in input().split()]
a_b = a - b
b_c = b - c
a_c = a - c

if a_c <= b:
  print('Yes')
  sys.exit(0)
if a_b <= b and b_c <=b: 
  print('Yes')
  sys.exit(0)
else:
  print('No')

Failing test case input:
2 110 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
a,b,c,d = [int(num) for num in input().split()]
a_b = abs(b - a)
b_c = abs(c - b)
a_c = abs(a - c)

if a_c <= d:
  print('Yes')
  sys.exit(0)
if a_b <= d and b_c <= d: 
  print('Yes')
  sys.exit(0)
else:
  print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if( (abs(a-c)>d & abs(a-b)>d) | ( abs(a-c)>d & abs(b-c)>d ) ) :
    print('no')
else :
    print('yes')

Failing test case input:
2 101 1 1

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if( (abs(a-c)<=d) or (abs(a-b)<=d and abs(b-c)<=d ) ) :
    print('Yes')
else :
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
print('Yes' if abs(a-b)<=d or abs(a-c)+abs(b-c)<=2*d else 'No')


Failing test case input:
-1 101 5 50

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
print('Yes' if abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d) else 'No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

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


Failing test case input:
2 001 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
flag = True
if not a - b <= d:
    if not b - c <= d:
        flag = False

if flag:
    print("Yes")
else:
    print("No")

Failing test case input:
6 111 1 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
flag = False
if abs(a - b) <= d:
    if abs(b - c) <= d:
        flag = True

if abs(a - c) <= d:
    flag = True

if flag:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

if max(b-a,c-d) <= d or (c-a) <= d:
    print("Yes")
else:
    print("No")

Failing test case input:
2 011 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())
 
if (abs(b-a) <= d and abs(c-b) <= d) or abs(c-a) <= d:
    print("Yes")
else:
    print("No")
Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



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

AB = abs(a - b)
BC = abs(b - c)
AC = abs(a - c)

if AC <=d:
    print("Yes")
elif AB <=d and BC <=d:
    print("Yes")
else:
    print("NO")


Failing test case input:
0 111 5 3

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):




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

AB = abs(a - b)
BC = abs(b - c)
AC = abs(a - c)

if AC <= d:
    print("Yes")
elif AB <= d and BC <= d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(map(int,input().split()))
if abs(s[0]-s[1])<=s[3] and abs(s[2]-s[1])<=s[3]:
    print("Yes")
else:
    print("No")

Failing test case input:
-1 100 -2 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s=list(map(int,input().split()))
if (abs(s[0]-s[1])<=s[3] and abs(s[2]-s[1])<=s[3]) or abs(s[0]-s[2])<=s[3]:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if abs(b - a) <= d and abs(c - b) <= d:
    print('Yes')
else:
    print('No')

Failing test case input:
-1 100 -1 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if (abs(b - a) <= d and abs(c - b) <= d) or abs(c - a) <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
print("Yes" if abs(a-c)<=d or b-a<=3 and c-b<=3 
else "No")

Failing test case input:
0 000 -2 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
print("Yes" if abs(c-a)<=d or abs(b-a)<=d and abs(c-b)<=d 
else "No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
x=abs(b-a)
y=abs(c-b)
z=abs(c-a)

if z <= d:
    print('Yes')
elif y <= d and z <= d:
    print('Yes')

else:
    print('No')

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
x=abs(b-a)
y=abs(c-b)
z=abs(c-a)

if z <= d:
    print('Yes')
elif y <= d and x <= d:
    print('Yes')

else:
    print('No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    a, b, c, d = map(int, input().split())
    distance = [a, b, c]
    distance.sort()
    if distance[2] - distance[1] <= d and distance[1] - distance[0] <= d:
        print('Yes')
    else:
        print('No')
main()

Failing test case input:
-1 101 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def main():
    a, b, c, d = map(int, input().split())
    distance = [a, b, c]
    a_c_distance = [a, c]
    a_c_distance.sort()
    if a_c_distance[1] - a_c_distance[0] <= d:
        print('Yes')
        return
    distance.sort()
    if distance[2] - distance[1] <= d and distance[1] - distance[0] <= d:
        print('Yes')
    else:
        print('No')
    
main()
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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

Failing test case input:
4 111 1 -1

Expected output:
No


Actual output:
Yes


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
if abs(c - a) <= d:
    print('Yes')
elif abs(b - a) <= d and abs(c - d) <= d:
    print('Yes')
else:
    print('No')

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
if abs(c - a) <= d:
    print('Yes')
elif abs(b - a) <= d and abs(c - b) <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

AB = abs(a - b)
BC = abs(b - c)
AC = abs(a - c)

if AB <= d and BC <= d:
    print("Yes")
elif AC <= d:
    print("YES")
else:
    print("No")


Failing test case input:
0 111 0 0

Expected output:
Yes


Actual output:
YES


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

AB = abs(a - b)
BC = abs(b - c)
AC = abs(a - c)

if AC <= d:
    print("Yes")
elif AB <= d and BC <= d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int,input().split())
if a-c <= d:
    print('Yes')
elif abs(a-b) <= d and abs(b-c) <= d:
    print('Yes')
else:
    print('No')

Failing test case input:
0 011 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int,input().split())
if abs(a-c) <= d:
    print('Yes')
elif abs(a-b) <= d and abs(b-c) <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())

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

Failing test case input:
2 000 1 1

Expected output:
Yes


Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split()
if (int(a[0]) - int(a[1]) <= int(a[3]) and int(a[1]) - int(a[2]) <= int(a[3])) or int(a[0]) - int(a[2]) <= int(a[3]):
    print("Yes")
else:
    print("No")


Failing test case input:
0 011 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a = input().split()
if (abs(int(a[0]) - int(a[1])) <= int(a[3]) and abs(int(a[1]) - int(a[2])) <= int(a[3])) or abs(int(a[0]) - int(a[2])) <= int(a[3]):
    print("Yes")
else:
    print("No")
Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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

Failing test case input:
-1 011 5 8

Expected output:
Yes


Actual output:
No


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


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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
e=[a,b,c]
e.sort()
if e[2]-e[1] <= d and e[1]-e[0] <= d:
  print("Yes")
else:
  print("No")

Failing test case input:
-1 100 -1 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
if abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d):
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) 

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    
    if abs(a[0]-a[2]) <a[3] or (abs(a[0] -a[1]) <a[3] and abs(a[1]-a[2]) <a[3]):
        print("Yes")
    else:
        print("No")

Failing test case input:
2 000 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) 

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if abs(a[0]-a[2]) <=a[3] or (abs(a[0] -a[1]) <=a[3] and abs(a[1]-a[2]) <=a[3]):
        print("Yes")
    else:
        print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = [int(x) for x in input().split()]

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


Failing test case input:
2 010 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = [int(x) for x in input().split()]

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if b-a<=d and c-b<=d:
    print('Yes')
else:
    print('No')

Failing test case input:
0 111 0 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(a-b)<=d and abs(b-c)<=d or abs(a-c)<=d:
    print('Yes')
else:
    print('No')
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, s, d, f = map(int, input().split())
if abs(d - s) <= f and abs(s - a) <= f:
    print("Yes")
else:
    print("No")


Failing test case input:
0 111 1 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, s, d, f = map(int, input().split())
if abs(d - s) <= f and abs(s - a) <= f or abs(d - a) <= f:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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

Failing test case input:
0 111 0 1

Expected output:
Yes


Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())


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


Failing test case input:
2 011 0 -1

Expected output:
No


Actual output:
Yes


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


ba =abs(b-a)
cb =abs(c-b)
ca =abs(c-a)

if ca <= d:
    print("Yes")
elif ba <= d and cb<= d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

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

Failing test case input:
2 100 1 1

Expected output:
Yes


Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,D=map(int, input().split())


if abs(B-A)<=D and abs(C-B) <= D:
    print('Yes')
else:
    print('No')

Failing test case input:
-1 111 2 50

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
A,B,C,D=map(int, input().split())


if abs(B-A)<=D and abs(C-B) <= D or abs(A-C) <= D:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if abs(a-b)<=d and abs(b-c)<=d :
  print('Yes')
else:
  print('No')

Failing test case input:
2 100 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if (abs(a-b)<=d and abs(b-c)<=d) or (abs(a-c) <= d):
  print('Yes')
else:
  print('No')
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a,b,c,d=map(int,input().split())
x=sorted([a,b,c])

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

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

Failing test case input:
-1 111 2 50

Expected output:
Yes


Actual output:

Fixed submission (verdict: Accepted):

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

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

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

Problem: p03351
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,c,d = list(map(int,input().split()))
if abs(b-a) < d and abs(c-b) < d:
    print("Yes")
else:
    print("No")

Failing test case input:
-1 100 -1 12

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = list(map(int,input().split()))
if abs(b-a) <= d and abs(c-b) <= d or abs(a-c) <=d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())
if (abs(b-a)>=d and abs(c-b)>=d) or abs(c-a)>=d:
    print("Yes")
else:
    print("No")

Failing test case input:
-1 011 5 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())
if (abs(b-a)<=d and abs(c-b)<=d) or abs(c-a)<=d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int, input().split())

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

Failing test case input:
0 111 0 0

Expected output:
Yes


Actual output:
No


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

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

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
ans = 'Yes'
if abs(a - b) > d and abs(b - c) > d or abs(a - c) > d:
    ans = 'No'
print(ans)

Failing test case input:
0 111 2 50

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
ans = 'No'
if abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):
    ans = 'Yes'
print(ans)

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

c2a = abs(c-a)
c2b2a = abs(c-b) + abs(b-a)

if c2a <= d or c2b2a <= d:
    print("Yes")
else:
    print("No")


Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


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

c2a = abs(c-a)
c2b = abs(c-b)
b2a = abs(b-a)

if c2a <= d or c2b <= d and b2a <= d:
    print("Yes")
else:
    print("No")
Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b , c, d = map(int, input().split())

if abs(a-c) <= d:
    print('No')

else:
    print('Yes')

Failing test case input:
4 101 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):



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

if abs(a-c) <= d:
    print('Yes')

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

else:
    print('No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


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

e = a - b
f = b - c
g = c - a

x = abs(e)
y = abs(f)
z = abs(g)

if x <= d and y <= d or z <= d:
    print('YES')
else:
    print('NO')

Failing test case input:
3 111 0 -1

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):


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

e = a - b
f = b - c
g = c - a

x = abs(e)
y = abs(f)
z = abs(g)

if x <= d and y <= d or z <= d:
    print('Yes')
else:
    print('No')