qyliang/CodeNanoFix huggingface dataset:
Buggy code:
input_lines = raw_input().split()
a = int(input_lines[0])
b = int(input_lines[1])
c = int(input_lines[2])
d = int(input_lines[3])

flag = 0
if abs(c - a) > d:
    if abs(b - a) > d or abs(c - b) > d:
        flag = 1

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


Fixed code:
input_lines = input().split()
a = int(input_lines[0])
b = int(input_lines[1])
c = int(input_lines[2])
d = int(input_lines[3])

flag = 0
if abs(c - a) > d:
    if abs(b - a) > d or abs(c - b) > d:
        flag = 1

if flag == 0:
    print("Yes")
else:
    print("No")
Buggy code:
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")

Fixed code:
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")
Buggy code:
#coding:utf-8

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

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


Fixed code:
# -*- coding: utf-8 -*-

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')
Buggy code:
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")

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

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


Fixed code:
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')
Buggy code:
a,b,c,d = map(int,input().split())
print('Yes' if abs(a-b) <= d or (abs(a-b) <= d and abs(b-c) <= d) else 'No')

Fixed code:
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')
Buggy code:
a, b, c, d = list(map(int, input().split()))
if b-a <= d and c-b <= d:
  print("Yes")
else:
  print("No")

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

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

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

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

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

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

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

print('No')
Buggy code:
#97a
a,b,c,d=map(int,input().split())
print('Yes' if abs(b-a)<=d and abs(c-b)<=d else 'No')

Fixed code:
#97a
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')
Buggy code:
a, b, c, d = map(int, input().split())

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

Fixed code:
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')
Buggy code:
#97a
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-b)<=d:
        print('Yes')
    else:
        print('No')

Fixed code:
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')
Buggy code:
import sys
input = sys.stdin.readline
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) or ac < d:
    print("Yes")
else:
    print("No")

Fixed code:
import sys
input = sys.stdin.readline
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) or ac <= d:
    print("Yes")
else:
    print("No")
Buggy code:
a,b,c,d = map(int, input().split())
if abs(a-b)<=d and abs(b-c)<=d: print('Yes')
else: print('No')

Fixed code:
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')
Buggy code:
a,b,c,d = list(map(int,input.split( )))

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

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

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


Fixed code:
a,b,c,d = map(int, input().split())
check1 = abs(c-a) <= d
check2 = abs(b-a) <= d and abs(c-b) <= d
print('Yes' if check1 or check2 else 'No')
Buggy code:
a,b,c,d = map(int, input().split())

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

Fixed code:
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")
Buggy code:
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")

Fixed code:
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')
Buggy code:
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])
l = sorted([a, b, c], reverse=True)
a_c = a - c
if a_c < 0:
  a_c = a_c*-1
if a_c < d or ((l[0]-l[1] < d) and (l[1]-l[2] < d)):
  print('Yes')
else:
  print('No')

Fixed code:
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])
l = sorted([a, b, c], reverse=True)
a_c = a - c
if a_c < 0:
  a_c = a_c*-1
if a_c <= d or ((l[0]-l[1] <= d) and (l[1]-l[2] <= d)):
  print('Yes')
else:
  print('No')
Buggy code:
a,b,c,d=map(int,input().split())
AB=abs(a-b)
BC=abs(b-c)
AC=abs(a-c)

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

Fixed code:
a,b,c,d=map(int,input().split())
AB=abs(a-b)
BC=abs(b-c)
AC=abs(a-c)

if AC<=d or (AC>d and AB<=d and BC<=d):
  print("Yes")
else:
  print("No")
Buggy code:
a, b, c, d = map(int, input().split())  
if abs(a - c) <= d or (abs(a-b) <= d & abs(b-c) <= d):
    print('Yes')
else:
    print('No')

Fixed code:
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")
Buggy code:
# input
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')


Fixed code:
# input
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')
Buggy code:
a, b, c, d = map(int, input().split())
if d > abs(a-b) and d > abs(c - b):
    print("No")
else:
    print("Yes")

Fixed code:
a, b, c, d = map(int, input().split())
if (abs(a-b) > d or abs(b-c) > d ) and abs(a-c) > d:
    print('No')
else:
    print('Yes')
Buggy code:
a, b, c, d = map(int, input().split())

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

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

Fixed code:
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")
Buggy code:
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")

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

Fixed code:
a, b, c, d = list(map(int, input().split()))
print('Yes' if abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d) else 'No')
Buggy code:
a,b,c,d=map(int,input().split());print("YNeos"[abs(a-b)>d or abs(b-c)>d and abs(a-c)>d::2])

Fixed code:
a,b,c,d=map(int,input().split());print("YNeos"[(abs(a-b)>d or abs(b-c)>d)and abs(a-c)>d::2])
Buggy code:
a, b, c, d = input().split()
a, b, c, d = int(a), int(b), int(c), int(d)
if min(max(b-a, c-b), c-a) <= d:
  print("Yes")
else:
  print("No")

Fixed code:
a, b, c, d = input().split()
a, b, c, d = int(a), int(b), int(c), int(d)
if min(max(abs(b-a), abs(c-b)), abs(c-a)) <= d:
  print("Yes")
else:
  print("No")
Buggy code:
a, b, c, d = [int(i) for i in input().split()]
print('Yes' if ( abs(b-a)<=d and abs(c-b)<=d) else 'No')

Fixed code:
a,b,c,d = [int(i) for i in input().split()]

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

Fixed code:
a, b, c, d = input().split(" ")
a = int(a)
b = int(b)
c = int(c)
d = int(d)
if abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):
    print("Yes")
else:
    print("No")
Buggy code:
import sys
input = sys.stdin.readline
a, b, c, d = [int(x) for x in input().split()]
if abs(c - a) <= d or abs(b - a) + abs(c - b) <= d:
    print("Yes")
else:
    print("No") 

Fixed code:
import sys
input = sys.stdin.readline
a, b, c, d = [int(x) for x in input().split()]
if abs(c - a) <= d or (abs(b - a) <= d and abs(c - b) <= d):
    print("Yes")
else:
    print("No")
Buggy code:
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')

Fixed code:
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")
Buggy code:
a,b,c,d=map(int,input().split())
if((c-b<=d)and(b-a<=d)):
  print("Yes")
else:
  print("No")

Fixed code:
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
  print("Yes")
elif abs(b-a)<=d and abs(b-c)<=d:
  print("Yes")
else:
  print("No")
Buggy code:
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')

Fixed code:
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')
Buggy code:
a, b, c, d = list(map(int, input().split()))
is_com = False
if abs(a - c) <= d:
    is_com = True
elif abs(a - b) <= d and abs(c - b) <= d:
    print("Yes")

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


Fixed code:
a, b, c, d = list(map(int, input().split()))
is_com = False
if abs(a - c) <= d:
    is_com = True
elif abs(a - b) <= d and abs(b - c) <= d:
    is_com = True

if is_com:
    print("Yes")
else:
    print("No")
Buggy code:
a,b,c,d=map(int,input().split())

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

Fixed code:
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')
Buggy code:
a,b,c,d = list(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')

Fixed code:
a,b,c,d = list(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')
Buggy code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    *A, d = nm()
    A = sorted(A)
    D = [A[i + 1] - A[i] for i in range(2)]
    if all([dd <= d for dd in D]):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()


Fixed code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    *A, d = nm()
    a = A[0]
    c = A[2]
    A = sorted(A)
    D = [A[i + 1] - A[i] for i in range(2)]
    if all([dd <= d for dd in D]) or abs(a - c) <= d:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
Buggy code:
a, b, c, d = map(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 code:
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")
Buggy code:
a,b,c,d = map(int, input().split())
print('Yes' if abs(a-b)<=d and abs(c-b)<=d else 'No')

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

flag = False

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

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

if flag == True:
    print('Yes')
else:
    print('No')


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

flag = False

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

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

if flag == True:
    print('Yes')
else:
    print('No')
Buggy code:
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')

Fixed code:
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')
Buggy code:
a,b,c,d=map(int,input().split())
print("Yes" if abs(a-b)<=d and abs(c-b)<=d else "No")

Fixed code:
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')
Buggy code:
a, b, c, d = [int(i) for i in input().split()]
if abs(a-b) <= d and abs(b-c) <=d:
  print("Yes")
else:
  print("No")

Fixed code:
a, b, c, d = [int(i) for i in input().split()]
if abs(a-c) <=d or (abs(a-b) <= d and abs(b-c) <=d):
  print("Yes")
else:
  print("No")
Buggy code:
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')

Fixed code:
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')
Buggy code:
a, b, c, d = mao(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')

Fixed code:
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")
Buggy code:
a,b,c,d = map(int,input().split())
if abs(c-a)<=d or (abs(b-a)<=d and abs(c-b)<=d)
    print("Yes")
else:
    print("No")

Fixed code:
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")
Buggy code:
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")

Fixed code:
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")
Buggy code:
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")


Fixed code:
a, b, c, d = list(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")
Buggy code:
a,b,c,d=map(int,input().split())

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

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

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


Fixed code:
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")
Buggy code:
a,b,c,d = map(int,input().split())
dis_ab = abs(b-a)
dis_bc = abs(c-b)

if dis_ab <= d and dis_bc <= d:
  print('Yes')
else:
  print('No')

Fixed code:
a,b,c,d = map(int,input().split())
dis_ab = abs(a-b)
dis_bc = abs(b-c)
dis_ac = abs(a-c)

if dis_ab <= d and dis_bc <= d:
  print('Yes')
elif dis_ac <= d:
  print('Yes')
else:
  print('No')
Buggy code:
a, b, c, d = map(int, input().split())
x = sorted(a, b)
y = sorted(c, b)

if (x[-1] - x[0]) <= d and (y[-1] - y[0]) <= d:
    print("Yes")
else:
    print("No")


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

if (max(a, c) - min(a, c)) <= d:
    print("Yes")
elif (x[-1] - x[0]) <= d and (y[-1] - y[0]) <= d:
    print("Yes")
else:
    print("No")
Buggy code:
a, b, c, d = map(int,input().split())
if abs(a-b) <= d and abs(b-c) <= d:
  print("Yes")
else:
  print("No")

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

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

Fixed code:
a,b,c,d = list(map(int,input().strip().split(' ')))
if abs(a-c)<=d or(abs(a-b)<=d and abs(b-c)<=d):
    print('Yes')
else:
    print('No')
Buggy code:
A,B,C,D=map(int, input().split())


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

Fixed code:
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')
Buggy code:
a, b c, d = [int(i) for i in input().split()]

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

Fixed code:
a, b, c, d = [int(i) for i in input().split()]

if abs(a-c) <= d:
    print('Yes')
elif abs(a-b) <= d and abs(b-c) <= d:
    print('Yes')
else:
    print('No')
Buggy code:
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")

Fixed code:
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')
Buggy code:
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
    print('Yes')
elif abs(a-b)<=d &abs(b-c)<=d:
    print('Yes')
else:
    print('No')

Fixed code:
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')
Buggy code:
a,b,c,d = map(int,input().split())
print(["No","Yes"][abs(a-c)<=d or (abs(a-b)<d and abs(b-c)<d)])

Fixed code:
a,b,c,d = map(int,input().split())
print(["No","Yes"][abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d)])
Buggy code:
a, b, c, d = map(int, input().split())

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

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

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

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

ab = abs(a-b)
bc = abs(b-c)
if (abs(a-c)<= d)or(ab <= d and bc <= d):
    print("Yes")
else:
    print("No")
Buggy code:
a,b,c,d = map(int, input().split())
if b-a <= 3 and c-b <= 3:
  print("Yes")
elif c-a <= 3:
  print("Yes")
else:
  print("No")

Fixed code:
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')
Buggy code:
a, b, c, d = map(int, inmput().split())

x = abs(a - b)
y = abs(b - c)
z = abs(c - a)

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


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

x = abs(a - b)
y = abs(b - c)
z = abs(c - a)

if z <= d:
  print('Yes')
elif x<= d and y <= d:
  print('Yes')
else:
  print('No')
Buggy code:
a,b,c,d=map(int,input().split())
a,b=max(a,b),min(a,b)
if (abs(a-c)<=d and abs(c-b)<=d ) or b-a<=d:print("Yes")
else:print("No")

Fixed code:
a,c,b,d=map(int,input().split())
a,b=max(a,b),min(a,b)
if (abs(a-c)<=d and abs(c-b)<=d ) or -b+a<=d:print("Yes")
else:print("No")
Buggy code:
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:
    print("Nn")

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

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

Fixed code:
a,b,c,d = map(int,input().split())
if abs(a-c) <= d or (abs(a-b) <= d and abs(c-b) <= d):
    print("Yes")
else:
    print("No")
Buggy code:
a, b, c, d = [int(i) for i in input().split()]
if abs(a-c) <= d:
    print("Yes")
elif abc(a-b) <= d and abc(b-c) <= d:
    print("Yes")
else:
    print("No")

Fixed code:
a, b, c, d = [int(i) for i in input().split()]
if abs(a-c) <= d:
    print("Yes")
elif abs(a-b) <= d and abs(b-c) <= d:
    print("Yes")
else:
    print("No")
Buggy code:
int_a, int_b, int_c, int_d = map(int, input().split())

result = False

if abs(int_a - int_c) <= int_d:
    result = True
elif abs(int_a - int_b) <= int_d and abs(int_b - int_c) <= int_d:
    result = True

if result:
    print('YES')
else:
    print('No')








Fixed code:
int_a, int_b, int_c, int_d = map(int, input().split())

result = False

if abs(int_a - int_c) <= int_d:
    result = True
elif abs(int_a - int_b) <= int_d and abs(int_b - int_c) <= int_d:
    result = True

if result:
    print('Yes')
else:
    print('No')
Buggy code:
a, b, c, d = map(int, input().split())

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

Fixed code:
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")
Buggy code:
a = list(map(input().split()))
if abs(a[2]- a[0]) <= a[3]:
  print("Yes")
elif abs(a[0] - a[1]) <= a[3] and abs(a[1] - a[2]) <= a[3]:
  print("Yes")
else:
  print("No")

Fixed code:
a = list(map(int,input().split()))
if abs(a[2] - a[0]) <= a[3]:
  print("Yes")
elif abs(a[0] - a[1]) <= a[3] and abs(a[1] - a[2]) <= a[3]:
  print("Yes")
else:
  print("No")
Buggy code:
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")

Fixed code:
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")
Buggy code:
#!/usr/bin/python

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

if __name__ == '__main__':
    main()


Fixed code:
#!/usr/bin/python

def main():
    a, b, c, d = [int(x) for x in 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()