qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a,b,c,d = map(int, input().split())
if c-a <= d:
  print("Yes")
elif 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(a-b)<=d and abs(b-c)<=d:
    print("Yes")
else:
    print("No")
Buggy code:
#!/usr/bin/env python3

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

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

Fixed code:
#!/usr/bin/env python3

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

Fixed code:
a,b,c,d = [int(x) for x in input().split()]
if(abs(a-c)<=d):
  print('Yes')
elif(abs(a-b)<=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 (max(abs(a - b), 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 (max(abs(a - b), abs(b-c)) <= d):
    print('Yes')
else:
    print('No')
Buggy code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b,c,d = I()
    if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d):
        return 'Yes'

    return 'No'



print(main())



Fixed code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b,c,d = LI()
    if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d):
        return 'Yes'

    return 'No'



print(main())
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:
    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 or abs(a-c)<d:
  print("Yes")
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,y,z,d=map(int,input().split())
if(abs(y-x)+abs(z-y)<=d or abs(z-x)<=d):
    print("Yes")
else:
    print("No")

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

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

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

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

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

elif 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 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 max(abs(b-a),abs(c-b)) <= d:
  print("Yes")
else:
  print("No")

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

ab_distance = max(a, b) - min(a, b)
bc_distance = max(b, c) - min(b, c)

if ab_distance <= d and bc_distance <= d:
  print('Yes')
else:
  print('No')


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

ab_distance = max(a, b) - min(a, b)
bc_distance = max(b, c) - min(b, c)
ac_distance = max(a, c) - min(a, c)

if ab_distance <= d and bc_distance <= d:
  print('Yes')
elif ac_distance <= d:
  print('Yes')
else:
  print('No')
Buggy code:
a, b, c, d = list(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())
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())

ans = 0

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

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

ans = 0

if abs(a-c) <= d:
	ans = 1

if abs(a-b) <= d and abs(b-c) <= d:
	ans = 1

if ans :
	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())
if abs(a - c) <= d or (abs(a-b)<=d and abs(b-c)<=d):
  print('Yes')
  quit()

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

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

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

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

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 = (int(x) for x in input().split())

kyori1 = a - b
kyori2 = a - c
kyori3 = b - c

if abs(kyori1) <= d or (abs(kyori2) <= d and abs(kyori3) <= d) :
    print('Yes')
else :
    print('No')

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

kyori1 = a - c
kyori2 = a - b
kyori3 = b - c

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

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

Fixed code:
a,b,c,d=list(map(int,input().split()))
if abs(a-c)<=d:
  print('Yes')
  exit()
if abs(c-b)<=d and abs(b-a)<=d:
  print('Yes')
  exit()
print('No')
Buggy code:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


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


Fixed code:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


a, b, c, d = LI()
print('Yes' if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d) else 'No')
Buggy code:
# -*- coding: utf-8 -*-
a, b, c, d = map(int, input().split())
if (abs(a - b) <= d and abs(a - c) <= d) or 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())
print('YNeos'[max(b-a,c-b)>d::2])

Fixed code:
a,b,c,d=map(int,input().split())
print('YNeos'[abs(c-a)>d and max(abs(b-a),abs(c-b))>d::2])
Buggy code:
a,b,c,d = map(int,input().split())
if c-a <= d or (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) or (abs(a-b) <= d and abs(c-b) <= d):
    print('Yes')
else:
    print('No')
Buggy code:
nyuryoku = input()
a,b,c,d = map(lambda x :int(x),nyuryoku.split())
ab = False
bc = False
ac = False
if abs(a-b) <= d:
    ab = True

if abs(b-c) <= d:
    bc = True

if abs(a-b) <= d:
    ac = True

if(ac or (ab and bc)):
    print("Yes")
else:
    print("No")


Fixed code:
nyuryoku = input()
a,b,c,d = map(lambda x :int(x),nyuryoku.split())
ab = False
bc = False
ac = False
if abs(a-b) <= d:
    ab = True

if abs(b-c) <= d:
    bc = True

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

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


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

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

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

exit(0)

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

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

exit(0)
Buggy code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


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:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


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 (d < abs(a-c)):
  if(d < abs(a-b) or d < abs(b-c)):
    print("No")
else:
  print("Yes")


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

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

Fixed code:
a, b, c, d = map(int, input().split())
print('Yes' if any([all([abs(a-b) <= d, abs(b-c)<= d]), abs(a-c) <= d]) else 'No')
Buggy code:
a, b, c, d = map(int, input().split())

x1 = abs(a - b)
x2 = abs(b - c)

if x1 <= d and x2 <= d:
    print('Yes')
else:
    print('No')


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

x1 = abs(a - b)
x2 = abs(b - c)
ac = abs(a - c)

if ac <= d:
    print('Yes')
elif (x1 <= d) and (x2 <= d):
    print('Yes')
else:
    print('No')
Buggy 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)<=0:
  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())
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 = map(int, input().split())

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

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

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

if x <= d and y <= y:
    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(a-c)

if (x <= d and y <= d) or z <= d:
    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(c - b) < d) else "No")

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

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

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

if max(abs(b - a), abs(c - b)) <= d or abs(a - 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(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())

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")
    



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

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


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