qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a <= k:
  print(":(")
else:
  print("Yay!")

Fixed code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

if e-a > k:
  print(":(")
else:
  print("Yay!")
Buggy code:
a=[int(input()) for i in range(5)]
k=int(input())
if abs(a[0]-a[5])>k:
  print(":(")
else:
  print("Yay!")

Fixed code:
a=[int(input()) for i in range(5)]
k=int(input())
if abs(a[0]-a[4])>k:
  print(":(")
else:
  print("Yay!")
Buggy code:
from sys import stdin

a = []
for i in range(6):
    a.append(int(input()))

if (a[4] - a[0]) <= a[5]:
    print('Yey!')
else:
    print(':(')
    

Fixed code:
from sys import stdin

a = []
for i in range(6):
    a.append(int(input()))

if (a[4] - a[0]) <= a[5]:
    print('Yay!')
else:
    print(':(')
Buggy code:
ans='Yay'
data=[]
for i in range(5):
    data.append(int(input()))

K=int(input())
for i in range(5):
    for j in  range(i,5):
        if abs(data[i]-data[j])>K:
            ans=':('
            break

print(ans)

Fixed code:
ans='Yay!'
data=[]
for i in range(5):
    data.append(int(input()))

K=int(input())
for i in range(5):
    for j in  range(i,5):
        if abs(data[i]-data[j])>K:
            ans=':('
            break

print(ans)
Buggy code:
a = [int(input()) for i in range(5)]
k = int(input())

for i in range(4):
   if a[i+1] - a[i] > k:
      print(':(')
      exit()
print('Yay!')

Fixed code:
a = [int(input()) for i in range(5)]
k = int(input())
for i in range(4):
   if a[4] - a[i] > k:
      print(':(')
      exit()
print('Yay!')
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if (a - e) < k:
  print("Yay!")
else:
  print(":(")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if b - a <= k and c - a <= k and d - a <= k and e - a <= k and c - b <= k and d - b <= k and e - b <= k and d - c <= k and e - c <= k and e - d <= k:
    print('Yay!')

else:
    print(':(')
Buggy code:
l1
for _ in range(6):
  l1.append(int(input()))

if (l1[4] - l1[0]) < l1[5]:
  r = ':('
else:
  r = 'Yay!'
  
  
print(r)

Fixed code:
l1 = []
for _ in range(6):
  l1.append(int(input()))
 
if (l1[4] - l1[0]) > l1[5]:
  r = ':('
else:
  r = 'Yay!'
  
  
print(r)
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
int n = 0
if e-a > k or e-b > k or d-a > k or e-c > k or d-b > k or c-a > k or e-d > k or d-c > k or c-b > k or b-a > k:
    n = 1

if n = 1:
    print(":(")
if n = 0:
    print("Yay!")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
n = 0
if e-a > k or e-b > k or d-a > k or e-c > k or d-b > k or c-a > k or e-d > k or d-c > k or c-b > k or b-a > k:
    n = 1

if n == 1:
    print(":(")
if n == 0:
    print("Yay!")
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (a-e) <= k:
  ans = "Yay!"
else :
  ans = ":("
 
print(ans)

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (e-a) <= k:
  ans = "Yay!"
else :
  ans = ":("
 
print(ans)
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
ab = b-a
ac = c-a
ad = d-a
ae = e-a
bc = c-b
bd = d-b
be = e-b
cd = d-c
ce = e-c
de = e-d
if ab <=	k and ac <= k and ad <= k	and ae <= k and bc <= k and bd <= k and be <= k and cd <= k and ce <= k and d\
e <= k:
    print("Yay!")
else:
    print(":(")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
ab = b-a
ac = c-a
ad = d-a
ae = e-a
bc = c-b
bd = d-b
be = e-b
cd = d-c
ce = e-c
de = e-d
if ab <= k and ac <= k and ad <= k and ae <= k and bc <= k and bd <= k and be <= k and cd <= k and ce <= k and de <= k:
    print("Yay!")
else:
    print(":(")
Buggy code:
r=[]
for _ in range(5):
  r.append(int(input()))

k=int(input())

i=0
while i<4:
  j=i+1
  while j<5:
    if abs(r[i]-r[j])>k:
      print("Yay!")
      exit()
    
    j+=1
  i+=1
  
print(":(")

Fixed code:
r=[]
for _ in range(5):
  r.append(int(input()))

k=int(input())

i=0
while i<4:
  j=i+1
  while j<5:
    if abs(r[i]-r[j])>k:
      print(":(")
      exit()
    
    j+=1
  i+=1
  
print("Yay!")
Buggy code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if (b-a)>k and (c-a)>k and (d-a)>k and (e-a)>k and (c-b)>k and (d-b)>k and (e-b)>k and (d-c)>k and (e-c)>k and (e-d)>k:
  print("Yay!")
else:
  print(":(")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if b - a > k:
    print(":(")
elif c - a > k:
    print(":(")
elif d - a > k:
    print(":(")
elif e - a > k:
    print(":(")
elif c - b > k:
    print(":(")
elif d - b > k:
    print(":(")
elif e - b > k:
    print(":(")
elif d - c > k:
    print(":(")
elif e - c > k:
    print(":(")
elif e - d > k:
    print(":(")
else:
    print("Yay!")
Buggy code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if abs(a-b)<k and abs(a-c)<k and abs(a-d)<k and abs(a-e)<k and abs(b-c)<k and abs(b-d)<k and abs(b-e)<k and abs(c-d)<k and abs(c-e)<k and abs(d-e)<k:
  print("Yay!")
else
  print(":(")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e-a <= k:
  print("Yay!")
else:
  print(":(")
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

x = list(a,b,c,d,e)
y = sorted(x)

if k >= y[4] -y[0]:
    print('Yay!')

else:
    print(':(')

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

x = list([a,b,c,d,e])
y = sorted(x)

if k >= y[4] -y[0]:
    print('Yay!')

else:
    print(':(')
Buggy code:
diff_L = []
for val in range(5):
    a = int(input())
    diff_L.append(a)

k = int(input())
ans = max(diff_L)-min(diff_L)
print(ans)

if ans <= k:
    print("Yay!")
else:
    print(":(")


Fixed code:
diff_L = []
for val in range(5):
    a = int(input())
    diff_L.append(a)

k = int(input())
ans = max(diff_L)-min(diff_L)

if ans <= k:
    print("Yay!")
else:
    print(":(")
Buggy code:
spot = [int(input()) for i in range(5)]
k = int(input())

D = True

for i in range(len(spot)):
    for j in range(i+1, len(spot)):
        if j-i > k:
            D = False

if D:
    print('Yay')
else:
    print(':(')

Fixed code:
spot = [int(input()) for i in range(5)]
k = int(input())

D = True

for i in range(len(spot)):
    for j in range(i+1, len(spot)):
        if spot[j] - spot[i] > k:
            D = False

if D:
    print('Yay!')
else:
    print(':(')
Buggy code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())

if e - a =<  f:
  print('Yay!')
else
  print(':(')

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if k < e - a :
  print(':(')
else:
  print('Yay!')
Buggy code:
x=[int(intput() for _ in range(5))]
k=int(input())
max=max(x)
min=min(x)
if max-min < k:
    print("Yay!")
else:
    print(":(")

Fixed code:
x=[int(input()) for _ in range(5)]
k=int(input())
max=max(x)
min=min(x)
if max-min <= k:
    print("Yay!")
else:
    print(":(")
Buggy code:
a, b, c, d, e, k = (int(input()) for _ in range(6))
print('Yey!' if abs(a-e) <= k else ':(')

Fixed code:
a, b, c, d, e, k = (int(input()) for _ in range(6))
print('Yay!' if abs(a-e) <= k else ':(')
Buggy code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if abs(a-b)<=k and abs(b-c)<=k and abs(c-d)<=k and abs(d-e)<=k:
  print('Yay!')
else:
  print(':(')


Fixed code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
    print("Yay!")
else:
    print(":(")
Buggy code:
lst=[]
for i in 5:
	lst.append(int(input()))
k = int(input())
sor = sorted(lst)
if sor[4] - sor[0] > k:
	print(":(")
else:
	print("Yay!")


Fixed code:
lst=[]
for i in range(5):
	lst.append(int(input()))
k = int(input())
sor = sorted(lst)
if sor[4] - sor[0] > k:
	print(":(")
else:
	print("Yay!")
Buggy code:
t = "Yay!"
f = ":("

antennas = [input() for _ in range(5)]
k = input()

if max(antennas) <= k:
  print(t)
else:
  flag = True
  for i in antennas:
    for j in antennas:
      if abs(i-j) >= k:
        flag = False
  if flag: print(t)
  else: print(f)
    

Fixed code:
t = "Yay!"
f = ":("

antennas = [int(input()) for _ in range(5)]
k = int(input())

if max(antennas) <= k:
    print(t)
else:
    flag = True
    for i in antennas:
        for j in antennas:
            if abs(i - j) >= k:
                flag = False
    if flag:
        print(t)
    else:
        print(f)
Buggy code:
a=[int(input()) for i in range(5)]
k=int(input())
x=max(a)-min(a)
if x>=k:
  print('Yay!')
else:
  print(':(')

Fixed code:
a=[int(input()) for i in range(5)]
k=int(input())
x=max(a)-min(a)
if x<=k:
  print('Yay!')
else:
  print(':(')
Buggy code:
antenna = [int(input()) for i in range(5)]
k = int(input())

if max(antenna) - min(antenna) =< k:
    print('Yay!')
else:
    print(':(')

Fixed code:
antenna = [int(input()) for i in range(5)]
k = int(input())

if max(antenna) - min(antenna) <= k:
    print('Yay!')
else:
    print(':(')
Buggy code:
a=[]
for i in range(5):
  a.append(int(input()))
k=int(input())
if a[4]-a[0]>k:
  ":("
else:
  "Yay!"

Fixed code:
a=[]
for i in range(5):
  a.append(int(input()))
k=int(input())
if a[4]-a[0]>k:
  print(":(")
else:
  print("Yay!")
Buggy code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-k > k:
  print(':(')
else:
  print('Yay')

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
 
k = int(input())
 
if e-a > k:
  print(":(")
else:
  print("Yay!")
Buggy code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
lis=[abs(a-b),abs(a-c),abs(a-d),abs(a-e),abs(b-c),abs(b-d),abs(b-e),abs(c-d),abs(c-e),abs(d-e)]
lis2=sorted(lis)
print(lis2)
if lis2[-1]<k:
    print("Yay!")
else:
    print(":(")

Fixed code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
lis=[abs(a-b),abs(a-c),abs(a-d),abs(a-e),abs(b-c),abs(b-d),abs(b-e),abs(c-d),abs(c-e),abs(d-e)]
lis2=sorted(lis)
if lis2[-1]<=k:
    print("Yay!")
else:
    print(":(")
Buggy code:
# -*- coding: utf-8 -*-
a=[]
ans="Yay!"
for _ in range(6):
  a.append(int(input()))
for i in range(5):
  for j in range(i+1,5):
    if abs(a.append(i)-a.append(j))>a.append(5):
      ans=":("
      break
print(ans)

Fixed code:
# -*- coding: utf-8 -*-
a=[]
ans="Yay!"
for _ in range(6):
  a.append(int(input()))
for i in range(5):
  for j in range(i+1,5):
    if abs(a[i]-a[j])>a[5]:
      ans=":("
      break
print(ans)
Buggy code:
a=[int(input) for i in range(5)]
b=int(input())
if a[-1] - a[0] <= b:
  print("Yay!")
 else:
  print(":(")

Fixed code:
a=[int(input()) for i in range(5)]
b=int(input())
if a[-1] - a[0] <= b:
    print("Yay!")
else:
    print(":(")
Buggy code:
L = []
for i in range(5):
    L.append(int(input()))
k = int(input())
if L[4]-L[0] > k:
    print(":(")
else:
    print("Yey!")

Fixed code:
L = []
for i in range(5):
    L.append(int(input()))
k = int(input())
if L[4]-L[0] > k:
    print(":(")
else:
    print("Yay!")
Buggy code:
def getResult(pos, K) :
    for i in range(len(pos)) :
        for j in range(len(pos)) :
            if abs(pos[i] - pos[j]) > K :
                return ":()"
    return "Yay!"

position = []
for i in range(5) :
    position.append(int(input()))
k = int(input())
print(getResult(position, k))

Fixed code:
def getResult(pos, K) :
    for i in range(len(pos)-1) :
        for j in pos[i+1:] :
            if abs(pos[i] - j) > K :
                return ":("
    return "Yay!"

position = []
for i in range(5) :
    position.append(int(input()))
k = int(input())
print(getResult(position, k))
Buggy code:
num_list=[int(input()) for i in range(5)]
k = int(input())
min_num, max_num = min(num_list),max(num_list)
print([":(","Yay!"][max_num - min_num >= k])

Fixed code:
num_list=[int(input()) for i in range(5)]
k = int(input())
min_num, max_num = min(num_list),max(num_list)
print([":(","Yay!"][max_num - min_num <= k])
Buggy code:
a = list(int(input()) for _  in range(5))
k = int(input())
ans='Yay!'
for i in a:
  for j in len(a):
    if a[j] - i >18:
      ans = ':('
print(ans)

Fixed code:
a = list(int(input()) for _  in range(5))
k = int(input())
ans='Yay!'
for i in a:
  for j in range(len(a)):
    if a[j] - i >k:
      ans = ':('
print(ans)
Buggy code:
a=int(input())
for i in range(3):
  input()
e=int(input())
k=int(input())
if e-a<=K:
  print('Yay!')
else:
  print(':(')

Fixed code:
a=int(input())
for i in range(3):
  z=input()
e=int(input())
k=int(input())
if e-a<=k:
  print('Yay!')
else:
  print(':(')
Buggy code:
a = int(input())
d = int(input())
f = int(input())
h = int(input())
e = int(input())
k = int(input())

if e - a =< k:
  print("Yay!")
else:
  print(":(")



Fixed code:
a = int(input())
d = int(input())
f = int(input())
h = int(input())
e = int(input())
k = int(input())

if e - a <= k:
  print("Yay!")
else:
  print(":(")
Buggy code:
a = int(input())
_ = int(input())
_ = int(input())
_ = int(input())
e = int(input())
k = int(input())

if e - a =< k:
  print("Yay!")
else:
  print(":(")



Fixed code:
a = int(input())
_ = int(input())
_ = int(input())
_ = int(input())
e = int(input())
k = int(input())

if e - a <= k:
  print("Yay!")
else:
  print(":(")
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e-a <= k:
  print("Yay!")
  else:
    print(":(")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (e-a) <= k:
  print("Yay!")
else:
  print(":(")
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
arr = [a,b,c,d,e]
bool = True

for i in range(len(arr)):
  for j in range(len(arr)):
    if i != j && abs(arr[i] - arr[j]) > k:
      bool = False
      break;
      
if bool:
  print("Yay!")
else:
  print(":(")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
arr = [a,b,c,d,e]
bool = True

for i in range(len(arr)):
  for j in range(len(arr)):
    if i != j and abs(arr[i] - arr[j]) > k:
      bool = False
      break;
      
if bool:
  print("Yay!")
else:
  print(":(")
Buggy code:
a=sorted([int(input()) for _ in range(5)])
k=int(input())
print("Yay!" if abs(a[0]-a[4]<=k) else ":(")

Fixed code:
a=sorted([int(input()) for _ in range(5)])
k=int(input())
print("Yay!" if abs(a[0]-a[4])<=k else ":(")
Buggy code:
l=[int(input()) for i in range(5)]
k=int(input())
if l[4]-l[1]>k:
    print(":(")
else:
    print("Yay!")

Fixed code:
l=[int(input()) for i in range(5)]
k=int(input())
if l[4]-l[0]>k:
    print(":(")
else:
    print("Yay!")
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

list = [a, b, c, d, e]

can = False
for i in range(len(list)):
  for j in range(len(list)):
    if i == j:
      continue
    if abs(list[i] - list[j]) <= k:
      can = True
      
if can:
  print("Yay!")
else:
  print(":(")
    


Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

list = [a, b, c, d, e]

can = False
for i in range(len(list)):
  for j in range(len(list)):
    if i == j:
      continue
    if abs(list[i] - list[j]) <= k:
      can = True
    else:
      can = False
      break
      
if can:
  print("Yay!")
else:
  print(":(")
Buggy code:
x = [int(input()) for _ in range(6)]
print(':(' if x[-2]-[0] > x[-1] else 'Yay!')

Fixed code:
x = [int(input()) for _ in range(6)]
print(':(' if x[-2]-x[0] > x[-1] else 'Yay!')
Buggy code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
frag = 0
max=a
min=a
if (max<b):
    max=b
if (max<c):
    max=c
if (max<d):
    max=d
if (max<e):
    max=e
if (min>b):
    min=b
if (min>c):
    min=c
if (min>d):
    min=d
if (min>e):
    min=e
z= max-min
if (z>k):
    print(':(')
    else :
        print('Yay!')

Fixed code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
max=a
min=a
if (max<b):
    max=b
if (max<c):
    max=c
if (max<d):
    max=d
if (max<e):
    max=e
if (min>b):
    min=b
if (min>c):
    min=c
if (min>d):
    min=d
if (min>e):
    min=e
z= max-min
if (z>k):
    print(':(')
else :
    print('Yay!')
Buggy code:
x = []
for i in range(5):
    x.append(int(input()))

k=int(input())

for i in range(len(x) - 1):
    print('i=' + str(i))
    for j in range(i + 1, len(x)):
        print(' j=' + str(j))
        print(x[j] - x[i])
        if x[j] - x[i] > k:
            print(':(')
            quit()
    
print('Yay')

Fixed code:
x = []
for i in range(5):
    x.append(int(input()))

k=int(input())

for i in range(len(x) - 1):
    for j in range(i + 1, len(x)):
        if x[j] - x[i] > k:
            print(':(')
            quit()
    
print('Yay!')
Buggy code:
a = []
for i in range(5):
    a.append(int(input()))
k = input()

if a[4] - a[0] <= k:
    print("Yay!")
else:
    print(":(")


Fixed code:
a = []
for i in range(5):
    a.append(int(input()))
k = int(input())

if a[4] - a[0] <= k:
    print("Yay!")
else:
    print(":(")
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

ant=[a,b,c,d,e]
for i in range(5):
    for j in range(5):
        if abs(ant[i]-ant[j]) > k:
            print(":(")
print("Yay!")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

ant=[a,b,c,d,e]
for i in range(5):
    for j in range(5):
        if abs(ant[i]-ant[j]) > k:
            print(":(")
            quit()
print("Yay!")
Buggy code:
a = int(input())
b = input()
c = input()
d = input()
e = input()
k = input()
if e - a <= k:
    print("Yey!")
else:
    print(":(")

Fixed code:
a = int(input())
b = input()
c = input()
d = input()
e = int(input())
k = int(input())
if e - a <= k:
    print("Yay!")
else:
    print(":(")
Buggy code:
l = [int(input()) for _ in range(5)]
max_distance = input()
l[-1] - l[0] = distance
if max_distance > distance:
  print("Yay!")
else:
  print(":(")

Fixed code:
l = [int(input()) for _ in range(5)]
max_distance = int(input())
distance = l[-1] - l[0]
if max_distance >= distance:
  print("Yay!")
else:
  print(":(")
Buggy code:
V = []
for i in range(5):
  V.append(int(input()))
               
k = int(input())
               
d = max(V) = min(V)

if d > k:
  print(":(")
else:
  print("Yay!")


Fixed code:
V = []
for i in range(5):
  V.append(int(input()))
               
k = int(input())
               
d = max(V) - min(V)

if d > k:
  print(":(")
else:
  print("Yay!")
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [a, b, c, d, e]
for i in range(len(l)-1):
  for j in range(1, len(l)):
    if l[i]-l[j] > k:
      print(":)")
      quit()
print("Yay!")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [e, d, c, b, a]
for i in range(len(l)-1):
  for j in range(len(l)):
    if l[i]-l[j] > k:
      print(":(")
      quit()
print("Yay!")
Buggy code:
A = [int(input()) for i in range(5)]
K = input()

lenge = 0

for i in range(A):
  for j in range(A):
    if A[i] - A[j] > K:
      s += 1
      
if s == 0:
  print(":(")
else :
  print("Yay!")

Fixed code:
A = [int(input()) for _ in range(5)]
K = int(input())

lenge = 0

for i in range(5):
  for j in range(5):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge > 0:
  print(":(")
else :
  print("Yay!")
Buggy code:
l=[int(input()) for i in range(5)]
flag=False
k=int(input())
for i in range(len(l)):
    for j in range(i+1,len(l)):
        if(l[j]-l[i]<=k):
            flag=True
            break
    if(flag):
        break
if(flag):
    print(":(")
else:
    print('Yay!')

Fixed code:
l=[int(input()) for i in range(5)]
flag=False
k=int(input())
for i in range(len(l)):
    for j in range(i+1,len(l)):
        if(l[j]-l[i]<=k):
            flag=True
        else:
            flag=False
            break
    if(not flag):
        break
if(not flag):
    print(":(")
else:
    print('Yay!')
Buggy code:
from sys import stdin

def main():
    I = [int(input()) for _ in [0] * 6]

    if I[4] - I[0] > I[5]:
        print(':(')
    else:
        print('Yah!')

input = lambda: stdin.readline().rstrip()
main()


Fixed code:
from sys import stdin

def main():
    I = [int(input()) for _ in [0] * 6]

    if I[4] - I[0] > I[5]:
        print(':(')
    else:
        print('Yay!')

input = lambda: stdin.readline().rstrip()
main()
Buggy code:
a,b,c,d,e,k=[int(input()) for i in range(6)]
if abs(e-a)<=k:
    print('Yay!')
else:
    print(':)')

Fixed code:
a,b,c,d,e,k=[int(input()) for i in range(6)]
if abs(e-a)<=k:
    print('Yay!')
else:
    print(':(')
Buggy code:
a,b,c,d,e,k=map(int,input())
if b-a<=k and c-b<=k and d-c<=k and e-d<=k:
    print('Yay!')
else:
    print(':(')

Fixed code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if b-a<=k and c-a<=k and d-a<=k and e-a<=k and c-b<=k and d-b<=k and e-b<=k and d-c<=k and e-c<=k and e-d<=k:
    print('Yay!')
else:
    print(':(')
Buggy code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a > k:
     print(':)')
else:
    print("Yay!")

Fixed code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a > k:
     print(':(')
else:
    print("Yay!")
Buggy code:
num = []
for i in range(5):
    num.append(int(input()))
k = int(input())

count = 0
if (max(num) - min(num)) > k:
    print(':()')
else:
    print('Yay!')

Fixed code:
num = []
for i in range(5):
    num.append(int(input()))
k = int(input())

if (max(num) - min(num)) > k:
    print(':(')
else:
    print('Yay!')
Buggy code:
a=input()
for i in range(3):
  input()
e=input()
k=input()
if e-a<=k:
  print("Yay!")
else:
  print(":(")

Fixed code:
a=input()
for i in range(3):
  input()
e=input()
k=input()
if int(e)-int(a)<=int(k):
  print("Yay!")
else:
  print(":(")
Buggy code:
a = [int(input()) for i in range(5)]
k = int(input())

if a[-1] - a[0] =< k:
    print("Yay!")
else:
    print(":(")

Fixed code:
#A
a = [int(input()) for i in range(5)]
k = int(input())

if (a[-1] - a[0] <= k ):
    print("Yay!")
else:
    print(":(")
Buggy code:
def main():
    input_data = [int(input()) for i in range(5)]
    k = int(input())
    count = 0

    input_data.sort()

    temp = input_data[0] - input_data[4]
    if temp > k :
        print(":(")
    else:
        print('Yay!')

if __name__ == '__main__':
    main()

Fixed code:
def main():
    input_data = [int(input()) for i in range(5)]
    k = int(input())

    input_data.sort()
    input_data.reverse()

    temp = input_data[0] - input_data[4]
    if temp > k :
        print(":(")
    else:
        print('Yay!')

if __name__ == '__main__':
    main()
Buggy code:
import sys
list = [input() for _ in range(6)]
for i in range(5):
  for j in range(i+1, 5):
    if list[j] - list[i] > list[5]:
      print(':(')
      sys.exit()
print('Yay!')

Fixed code:
import sys
list = [int(input()) for _ in range(6)]
for i in range(5):
  for j in range(i+1, 5):
    if list[j] - list[i] > list[5]:
      print(':(')
      sys.exit()
print('Yay!')