qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse = True)
d = [0,2,5,5,4,5,6,3,7,6]
S = set()
for a in A:
    S.add(d[a])

INF = 10 ** 8
dp = [-INF for _ in range(N+1)]
dp[0] = 0

for i in range(N+1):
    for s in S:
        if i - s >= 0:
            dp[i] = max(dp[i], dp[i-s]+1)

ans = 0
digit = dp[N]

print(dp)

for i in range(digit-1, -1, -1):
    if i != 0:
        for a in A:
            if dp[N-d[a]] == i:
                ans = ans * 10 + a
                N -= d[a]
                break
    else:
        for a in A:
            if N == d[a]:
                ans = ans * 10 + a
                break
print(ans)

Fixed code:
N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse = True)
d = [0,2,5,5,4,5,6,3,7,6]
S = set()
for a in A:
    S.add(d[a])

INF = 10 ** 8
dp = [-INF for _ in range(N+1)]
dp[0] = 0

for i in range(N+1):
    for s in S:
        if i - s >= 0:
            dp[i] = max(dp[i], dp[i-s]+1)

ans = 0
digit = dp[N]

for i in range(digit-1, -1, -1):
    if i != 0:
        for a in A:
            if dp[N-d[a]] == i:
                ans = ans * 10 + a
                N -= d[a]
                break
    else:
        for a in A:
            if N == d[a]:
                ans = ans * 10 + a
                break
print(ans)
Buggy code:
N,M=map(int, input().split())
A=list(map(int, input().split()))
inf = float('inf')

number = [6,2,5,5,4,5,6,3,7,6]


dp = [-1*inf]*(N+1)
dp[0] = 0
for i in range(1,N+1):
  dp_new = 0
  for j in A:
    if i - number[j] >= 0:
      if dp[i-number[j]] +1 > dp_new:
        dp[i] = dp[i-number[j]] +1

A.sort(reverse=True)
ans = ""
while N > 0:
  for j in A:
    if dp[N] == dp[N-number[j]] + 1:
      ans += str(j)
      N -= number[j]
      break

print(int(ans))

Fixed code:
N,M=map(int, input().split())
A=list(map(int, input().split()))
inf = float('inf')

number = [6,2,5,5,4,5,6,3,7,6]


dp = [-1*inf]*(N+1)
dp[0] = 0
for i in range(1,N+1):
  dp_new = 0
  for j in A:
    if i - number[j] >= 0:
      if dp[i-number[j]] +1 > dp_new:
        dp[i] = dp[i-number[j]] +1
        dp_new = dp[i]

A.sort(reverse=True)
ans = ""
while N > 0:
  for j in A:
    if N - number[j] >= 0:
      if dp[N] == dp[N-number[j]] + 1:
        ans += str(j)
        N -= number[j]
        break

print(int(ans))
Buggy code:
ma_map = [ -1, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]
N, M = (int(i) for i in input().split())
ma = list(int(i) for i in input().split())
memo = [-1] * 100000

def dfs(num):
	if memo[num] != -1: return memo[num]
	if num == 0: return 0

	ret = -1
	for p in ma:
		if 0 <= num - ma_map[p]:
			ret = max(dfs(num - ma_map[p]) * 10 + p, ret)

	memo[num] = ret
	return ret

print(ma_map[2])
ma.sort()
print(dfs(N))

Fixed code:
import sys
sys.setrecursionlimit(1000000)

ma_map = [ -1, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]
N, M = (int(i) for i in input().split())
ma = list(int(i) for i in input().split())
memo = [-1] * 100000

def dfs(num):
	if memo[num] != -1: return memo[num]
	if num == 0: return 0

	ret = -1
	for p in ma:
		if 0 <= num - ma_map[p]:
			ret = max(dfs(num - ma_map[p]) * 10 + p, ret)

	memo[num] = ret
	return ret

ma.sort()
print(dfs(N))
Buggy code:
import sys
sys.setrecursionlimit(1000000)

ma_map = [ -1, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]
N, M = (int(i) for i in input().split())
ma = list(int(i) for i in input().split())
memo = [-1] * 100000

def dfs(num):
	if memo[num] != -1: return memo[num]
	if num == 0: return 0

	ret = -1
	for p in ma:
		if 0 <= num - ma_map[p]:
			d = dfs(num - ma_map[p])
			if d == -1: continue
			ret = max(dfs(num - ma_map[p]) * 10 + p, ret)

	memo[num] = ret
	return ret

print(ma_map[2])
ma.sort()
print(dfs(N))

Fixed code:
import sys
sys.setrecursionlimit(1000000)

ma_map = [ -1, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]
N, M = (int(i) for i in input().split())
ma = list(int(i) for i in input().split())
memo = [-1] * 100000

def dfs(num):
	if memo[num] != -1: return memo[num]
	if num == 0: return 0

	ret = -1
	for p in ma:
		if 0 <= num - ma_map[p]:
			d = dfs(num - ma_map[p])
			if d == -1: continue
			ret = max(dfs(num - ma_map[p]) * 10 + p, ret)

	memo[num] = ret
	return ret

ma.sort()
print("{}".format(dfs(N)))
Buggy code:

# coding: utf-8

# In[46]:


def main():
    N,M = map(int, input().split())
    A = list(map(int, input().split()))
    
    match = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
    
    result = [-1 for _ in range(N+1)]
    result[0] = 0
    
    print(result)
    
    for i in range(1, N+1):
        for a in A:
            if i < match[a]:
                print(i,a,result)
                continue
            result[i] = max(result[i], result[i-match[a]]*10+a)
            print(i,a,result)
    
    print(result[N])


# In[47]:


main()



Fixed code:

# coding: utf-8

# In[1]:


def main():
    N,M = map(int, input().split())
    A = list(map(int, input().split()))
    
    match = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
    
    result = [-1 for _ in range(N+1)]
    result[0] = 0
    
    #print(result)
    
    for i in range(1, N+1):
        for a in A:
            if i < match[a]:
                #print(i,a,result)
                continue
            result[i] = max(result[i], result[i-match[a]]*10+a)
            #print(i,a,result)
    
    print(result[N])


# In[2]:


main()
Buggy code:
n, m = map(int, input().split())
a = list(map(int, input().split()))
dp = [0] * (n+1)
for i in range(1, n+1):
    for j in a:
        cost_j = int("0255456376"[j])
        if i- cost_j >= 0:
            dp[i] = max(dp[i], j+dp[i-cost_j]*10)
print(dp[n])


Fixed code:
n, m = map(int, input().split())
a = list(map(int, input().split()))
inf = float("inf")
dp = [-inf] * (n+1)
dp[0] = 0
for i in range(1, n+1):
    for j in a:
        cost_j = int("0255456376"[j])
        if i- cost_j >= 0:
            dp[i] = max(dp[i], j+dp[i-cost_j]*10)
print(dp[n])
Buggy code:
import sys

mp = [6, 2, 5, 5, 4, 5, 6, 3, 7, 6]

if __name__ == '__main__':
    n, m = map(int, input().split())
    a = sorted(input().split(), reverse=True)

    dp = [-10007] * (n + 1)
    dp[0] = 0
    for i in a:
        step = mp[int(i)]
        for j in range(step, n + 1):
            dp[j] = max(dp[j - step] + 1, dp[j])

    print(dp)
    i = n
    while i > 0:
        for x in a:
            step = mp[int(x)]
            if i >= step and dp[i - step] == dp[i] - 1:
                sys.stdout.write(x)
                i -= step
                break
    print()


Fixed code:
import sys

mp = [6, 2, 5, 5, 4, 5, 6, 3, 7, 6]

if __name__ == '__main__':
    n, m = map(int, input().split())
    a = sorted(input().split(), reverse=True)

    dp = [-10007] * (n + 1)
    dp[0] = 0
    for i in a:
        step = mp[int(i)]
        for j in range(step, n + 1):
            dp[j] = max(dp[j - step] + 1, dp[j])

    i = n
    while i > 0:
        for x in a:
            step = mp[int(x)]
            if i >= step and dp[i - step] == dp[i] - 1:
                sys.stdout.write(x)
                i -= step
                break
    print()
Buggy code:
import copy

N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

t = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
L = {}
for i in A:
  if t[i] in L:
    if L[t[i]] < i:
      L[t[i]] = i
  else:
    L[t[i]] = i
  
dp = [[0 for j in range(10)] for i in range(N)]
ja = [0 for j in range(10)]
for i in L.items():
  dp[i[0] - 1][i[1]] = 1
for i in range(N):
  if dp[i] == ja:
    continue
  for j in L.items():
    k = i + j[0]
    if k < N:
      t = copy.deepcopy(dp[i])
      t[j[1]] += 1
      for ii in range(9, 0, -1):
        if t[ii] > dp[k][ii]:
          dp[k] = t
          break
        elif t[ii] < dp[k][ii]:
          break
          
t = dp[-1]
Ans = ""
for i in range(9, 0, -1):
  for k in range(t[i]):
    Ans += str(i)
    
print(Ans)

Fixed code:
import copy

N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

t = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
L = {}
for i in A:
  if t[i] in L:
    if L[t[i]] < i:
      L[t[i]] = i
  else:
    L[t[i]] = i

dp = [[0 for j in range(10)] for i in range(N)]
for i in L.items():
  if i[0] - 1 < N:
    dp[i[0] - 1][i[1]] = 1
for i in range(N):
  if max(dp[i]) == 0:
    continue
  for j in L.items():
    k = i + j[0]
    if k < N:
      t = copy.deepcopy(dp[i])
      t[j[1]] += 1
      if sum(t) > sum(dp[k]):
        dp[k] = t
      else:
        for ii in range(9, 0, -1):
          if t[ii] > dp[k][ii]:
            dp[k] = t
            break
          elif t[ii] < dp[k][ii]:
            break
          
t = dp[-1]
Ans = ""
for i in range(9, 0, -1):
  for j in range(t[i]):
    Ans += str(i)
    
print(Ans)
Buggy code:
import numpy as np
import math

INF = 1000000

N,M = map(int, input().split())
match = {1:2, 2:5, 3:5, 4:4, 5:5, 6:6, 7:3, 8:7, 9:6}
A = list(map(int, input().split()))

match = {a:match[a] for a in A}

dp = []

for i in range(N+1):
    if i == 0:
        dp.append(0)
    else:
        tmp = [dp[i-m] for m in match.values() if i-m >= 0]
        if tmp == []:
            dp.append(-float('inf'))
        else:
            dp.append(max(tmp)+1)

s = ''
nums = list(match.keys())
print(nums)
while(True):
    for num in nums:
        if N - match[num] >= 0 and dp[N - match[num]] == dp[N] - 1:
            s = s + str(num)
            N-=match[num]
            break
    if N == 0:
        break

print(s)


Fixed code:
import numpy as np
import math

INF = 1000000

N,M = map(int, input().split())
match = {1:2, 2:5, 3:5, 4:4, 5:5, 6:6, 7:3, 8:7, 9:6}
A = list(map(int, input().split()))

match = {a:match[a] for a in A}

dp = []

for i in range(N+1):
    if i == 0:
        dp.append(0)
    else:
        tmp = [dp[i-m] for m in match.values() if i-m >= 0]
        if tmp == []:
            dp.append(-float('inf'))
        else:
            dp.append(max(tmp)+1)
s = ''
nums = list(match.keys())
nums.sort(reverse=True)
while(True):
    for num in nums:
        if N - match[num] >= 0 and dp[N - match[num]] == dp[N] - 1:
            s = s + str(num)
            N-=match[num]
            break
    if N == 0:
        break

print(int(s))
Buggy code:
n,k = map(int,input().split())
if N>=2*K-1:
  print("YES")
else:
  print("NO")

Fixed code:
n, k = map(int, input().split())

if n >= 2*k - 1:
    print('YES')
else:
    print('NO')
Buggy code:
N, K = map(int, input().split())
print('YES' if N >= 1+2*K else 'NO')

Fixed code:
N, K = map(int, input().split())
print('YES' if (N+1) // K >= 2 else 'NO')
Buggy code:
n,k = map(int,input().split())
print("YES") if -(-n%2) >= k else print("NO")

Fixed code:
n,k = map(int,input().split())
print("YES") if -(-n//2) >= k else print("NO")
Buggy code:
A, B = map(int, input().split())
line = []
for k in range(0,A):
    line.append(k)
line = line[1::2]
if len(line) >= B:
    print("YES")
else:
    print("NO")


Fixed code:

A, B = map(int, input().split())
line = []
for k in range(0,A+1):
    line.append(k)
line = line[1::2]

if len(line) >= B:
    print("YES")
else:
    print("NO")
Buggy code:
n, k = map(int, input().split())

if n/2 >= k:
    print("YES")
elif n/2 + 1 == k:
    print("YES")
else:
    print("NO")

Fixed code:
n,k = map(int,input().split())
if n / 2 + 1 > k and not (n == 2 and k == 2):
    print("YES")
elif n == 2 and k == 2:
    print("NO")
else:
    print("NO")
Buggy code:
n, k = map(int, input().split())

if n/2 >= k:
    print("YES")
elif n/2 + n%2 == k:
    print("YES")
else:
    print("NO")

Fixed code:
import math

n, k = map(int, input().split())

if int(n/2) >= k:
    print("YES")
elif int(n/2) + n%2 == k:
    print("YES")
else:
    print("NO")
Buggy code:
# -*- coding: utf-8 -*-

import sys

i_str = input().split(' ')
a = int(i_str[0])
n = int(i_str[0])

if (a+1) / 2 >= n:
    print("YES")
else:
    print("NO")


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

import sys

i_str = input().split(' ')
a = int(i_str[0])
n = int(i_str[1])

if (a+1) / 2 >= n:
    print("YES")
else:
    print("NO")
Buggy code:
n, k = map(int, input().split())
if (n - 1) // k >= 2:
  print("YES")
else:
  print("NO")

Fixed code:
n, k = map(int, input().split())

if((n+1) / 2 >= k):
  print('YES')
else:
  print('NO')
Buggy code:
N,K = map(int,input().split())
if N%2 == 0:
  if N >= K:
    print('YES')
  else:
    print('NO')
else:
  if N+1//2 >= K:
    print('YES')
  else:
    print('NO')

Fixed code:
N,K = map(int,input().split())
if N%2 == 0:
  if N//2 >= K:
    print('YES')
  else:
    print('NO')
else:
  if (N+1)//2 >= K:
    print('YES')
  else:
    print('NO')
Buggy code:
a,b = map(int,input().split())
cnt = 0
for i in range(1,a,2):
    cnt += 1
 
if cnt>=b:
    print("YES")
else:
    print("NO")

Fixed code:
a,b = map(int,input().split())
cnt = 0
for i in range(0,a,2):
    cnt += 1

if cnt>=b:
    print("YES")
else:
    print("NO")
Buggy code:
n,k=map(int, input().split())
a = n // 2
a += n % 2
print(a)
if a >= k:
  print("YES")
else:
  print("NO")

Fixed code:
n,k=map(int, input().split())
a = n // 2
a += n % 2
if a >= k:
  print("YES")
else:
  print("NO")
Buggy code:
n,k= map(int, input().split())
if n+1>k*2:
    print("YES")
else:
    print("NO")


Fixed code:
n,k = map(int,input().split())
if n >= 2*k - 1:
  print("YES")
else:
  print("NO")
Buggy code:
n,k= map(int, input().split())
if n+1>2*k:
    print(YES)
else:
    print(NO)


Fixed code:
n,k= map(int, input().split())
if n+1>=k*2:
    print("YES")
else:
    print("NO")
Buggy code:
n, k = [int(i) for i in input().split()]
if n//k > 1:
    print("YES")
else:
    print("NO")

Fixed code:
n, k = [int(i) for i in input().split()]

if (n+1)//2 >= k:
    print('YES')
else:
    print('NO')
Buggy code:
a,b = map(int,input().split())
a = -(-a // 2)
print(a)
print('YES') if a >= b else print('NO')

Fixed code:
a,b = map(int,input().split())
a = -(-a // 2)
print('YES') if a >= b else print('NO')
Buggy code:
import(math)

a,b=map(int,input().split())
if math.ceil(a/2)>=b:
  print('YES')
else:
  print('NO')

Fixed code:
import math
 
a,b=map(int,input().split())
if math.ceil(a/2)>=b:
  print('YES')
else:
  print('NO')
Buggy code:
n,k=map(int,input().split())
if (n+1)/2>=k:
  print('YES')
else:
  print('')NO

Fixed code:
n,k=map(int,input().split())
if (n+1)/2>=k:
  print('YES')
else:
  print('NO')
Buggy code:
A,B=map(int,input().split())

if(A>2*B-1):
  print("YES")
else:
  print("NO")

Fixed code:
A,B=map(int,input().split())

if(A>=2*B-1):
  print("YES")
else:
  print("NO")
Buggy code:
N, K =  map(int,input().split())
if N%2==0 and N >= (K//2):
  print("YES")
elif N%2==1 and N >= (K//2)+1:
  print("YES")
else:
  print("NO")

Fixed code:
N, K =  map(int,input().split())
if N%2==0 and (N//2) >= K:
  print("YES")
elif N%2==1 and (N//2)+1 >= K:
  print("YES")
else:
  print("NO")
Buggy code:
N, K = [int(i) for i in input().split()]

if K < (N - 1) // 2:
  print("YES")
else:
  print("NO")

Fixed code:
N, K = [int(i) for i in input().split()]
 
if (K - 1) <= (N - 1) // 2:
  print("YES")
else:
  print("NO")
Buggy code:
N,K = [int(i) for i in input().split()]
if (N / 2 >= K or K == 1):
    print("YES")
else:
    print("NO")


Fixed code:
N,K = [int(i) for i in input().split()]
if (N / 2 + 1 > K or K == 1):
    print("YES")
else:
    print("NO")
Buggy code:
n, k = map(int, input().split())
ans = n // 2
if (n + 1) // 2 > k:
    print('NO')
else:
    print('YES')

Fixed code:
n, k = map(int, input().split())
ans = n // 2
if (n + 1) // 2 < k:
    print('NO')
else:
    print('YES')
Buggy code:
n,k=map(int,input().split())
if k*2<=n:
  print("YES")
else:
  print("NO")

Fixed code:
n,k=map(int,input().split())
if k*2<=n+n%2:
  print("YES")
else:
  print("NO")
Buggy code:
n,k = list(map(int, input().split()))
if int(n/k)+1 >= k:
  print("YES")
else:
  print("NO")

Fixed code:
n,k = list(map(int, input().split()))
#print(int(n/2)+1)
if int((n+1)/2) >= k:
  print("YES")
else:
  print("NO")
Buggy code:
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) // math.gcd(x, y)

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


    if a[0]//2 >=a[1] :
        print("YES")
    else:
        print("NO")


Fixed code:
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) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    
    if a[0] % 2 ==1:
        a[0] +=1


    if a[0]//2 >=a[1] :
        print("YES")
    else:
        print("NO")
Buggy code:
nData = []
nData  = input().rstrip().split(' ')

nN = int(nData[0])
nK = int(nData[1])

nTmp = nK * 2

if (nN >= nTmp):
 print('YES')
else:
 print('NO')


Fixed code:
nData = []
nData  = input().rstrip().split(' ')

nN = int(nData[0])
nK = int(nData[1])
nN += 1
nTmp = nK * 2


if (nN >= nTmp):
  print('YES')
else:
 print('NO')
Buggy code:
#coding:utf-8

n,k = map(int,input().split())

if n > 2*k:
	print('YES')
else:
	print('NO')

Fixed code:
#coding:utf-8

n,k = map(int,input().split())

if n+1 >= 2*k:
	print('YES')
else:
	print('NO')
Buggy code:
a,b = map(int,input().split())
if b+b-1 >= a:
  print("YES")
else:
  print("NO")



Fixed code:
a,b = map(int,input().split())
if b+b-1 <= a:
  print("YES")
else:
  print("NO")
Buggy code:
n,k=map(int,input().split())
if n>=k*2+1:
  print("YES")
else:
  print("NO")

Fixed code:
n,k=map(int,input().split())
if n>=k*2-1:
  print("YES")
else:
  print("NO")
Buggy code:
N,K=map(int,input().split())
if N>2*K:
  print("YES")
else:
  print("NO")

Fixed code:
N,K=map(int,input().split())
if N>2*K-2:
  print("YES")
else:
  print("NO")
Buggy code:
n,k=map(int,input().split())

if int((n+1)/2)>k:
  print("YES")
else:
  print("NO")

Fixed code:
n,k=map(int,input().split())

if (n+1)//2>=k:
    print('YES')
else:
    print('NO')
Buggy code:
N, K = map(int, input())

if (2*(K-1) + 1 <= N):
    print('YES')
else:
    print('NO')


Fixed code:
N, K = map(int, input().split())

if (2*(K-1) + 1 <= N):
    print('YES')
else:
    print('NO')
Buggy code:
n, k = map(int, input().split())
if n > 2*k-1:
  print("YES")
else:
  print("NO")

Fixed code:
n,k = map(int,input().split())

if n>=(2*k-1):
    print("YES")
else:
    print("NO")
Buggy code:
N,K=map(int,input().split())
if K<=(N-1)//2:
  print('YES')
else:
  print('NO')

Fixed code:
N,K=map(int,input().split())
if K<=(N+1)//2:
  print('YES')
else:
  print('NO')
Buggy code:
N , K = map (int,input().split())

if (N+1)//K >= K:
  print("YES")
else:
  print("NO")

Fixed code:
N,K = map(int, input().split())

P = (N+1)//2

if P >= K:
    print('YES')
else:
    print('NO')
Buggy code:
n,k=map(int,input().split())
import math
if k>math.ceil(n/2):
  print("YES")
else:
  print("NO")

Fixed code:
import math
n, k = map(int, input().split())
if math.ceil(n / 2) < k:
    print("NO")
else:
    print("YES")
Buggy code:
n,k = list(map(int, input().split()))
if n//2 >= k:
  print("YES")
else:
  print("NO")

Fixed code:
n,k = list(map(int, input().split()))
if n//2+(n%2) >= k:
  print("YES")
else:
  print("NO")
Buggy code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,k =iim()
if n%2 == 0:
    if k <= n//2:
        print('YES')
elif k <= (n-1)//2+1:
    print('YES')
else:
    print('NO')

Fixed code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,k =iim()
if n%2 == 0:
    if k <= n//2:
        print('YES')
    else:
        print('NO')
elif k <= (n-1)//2+1:
    print('YES')
else:
    print('NO')
Buggy code:
N, K = map(int, input().split())

if N/2 > K:
  print("NO")
else:
  print("YES")

Fixed code:
N,K=map(int,input().split())
if K>N//2+N%2:
    print("NO")
else:
    print("YES")
Buggy code:

import math

n,k = map(int,input().strip().split())

if math.ceil(n/2) <= k:
  print("YES")
else:
  print("NO")

Fixed code:

import math

n,k = map(int,input().strip().split())

if math.ceil(n/2) >= k:
  print("YES")
else:
  print("NO")
Buggy code:
n,k =list(map(int,input().split())
if k*2-1 > n:
    print("NO")
else:
    print("YES")

Fixed code:
n,k =list(map(int,input().split()))
if k*2-1 > n:
    print("NO") 
else:
    print("YES")
Buggy code:
N,K=map(int, input().split())
print('YES' if N>2*K-1 else 'NO')

Fixed code:
N, K = map(int, input().split())
print('YES' if 2 * K - 1 <= N else 'NO')
Buggy code:
n, k = [int(i) for i in input().split()]

print("YES" if n >= k*2 else "NO")

Fixed code:
n, k = [int(i) for i in input().split()]

print("YES" if n >= k*2-1 else "NO")
Buggy code:
N,K= map(int,input().split())
if N > K*2-1:
	print('YES')
else:
	print('NO')


Fixed code:
N, K = map(int, input().split())
if(K == 1): print("YES")
else:
    if((N-1)//(K-1)>=2):print("YES")
    else: print("NO")
Buggy code:
b,c=map(input().split())
  
  if (b//2+b%2)>=c:
    print("YES")
  else : print("NO")

Fixed code:
b,c=map(int,input().split())
  
if (b//2+b%2)>=c:
    print("YES")
else : print("NO")
Buggy code:
N,K= map(int,input().split())
if N > K*2:
	print('YES')
else:
	print('NO')


Fixed code:
N, K = map(int,input().split())
if (N>=2*K-1):
    print('YES')
else:
    print('NO')
Buggy code:
N,K = map(int,list(input().split(" ")))
if K > N//2:
  print("NO")
else:
  print("YES")

Fixed code:
N,K = map(int,list(input().split(" ")))
if K > (N+1)//2:
  print("NO")
else:
  print("YES")
Buggy code:
N, K = map(int, input().split())
if N > 2 * K - 2:
    print('YES')
else:
    print('No')

Fixed code:
N, K = map(int, input().split())
if N > 2 * K - 2:
    print('YES')
else:
    print('NO')
Buggy code:
N, K = map(int,input().split())
if N % 2 != 0:
    if (N/2 + 1) >= K:
    print("YES")
    else:
    print("NO")
else:
    if (N/2) >= K:
    print("YES")
    else:
    print("NO")


Fixed code:
N, K = map(int,input().split())
if N % 2 != 0:
    if (N/2 + 1) >= K:
        print("YES")
    else:
        print("NO")
else:
    if (N/2) >= K:
        print("YES")
    else:
        print("NO")
Buggy code:
N, K = [int(s) for s in input().split(' ')]
x = 0
if N%2:
    x = N/2
else:
    x = (N-1) / 2
if x>=K:
    print("YES")
else:
    print("NO")

Fixed code:
N, K = [int(s) for s in input().split(' ')]
x = 0
if N%2:
    x = (N + 1) / 2
else:
    x = N/ 2
if x>=K:
    print("YES")
else:
    print("NO")
Buggy code:
n,k=map(int,input().split())
n=n/2+0.5
print(n)
if n>=k:
    print("YES")
else:
    print("NO")



Fixed code:
n,k=map(int,input().split())
n=n/2+0.5
if n>=k:
    print("YES")
else:
    print("NO")
Buggy code:
n,k=map(int,input().split())
n=n/2+1
print(n)
if n>=k:
    print("YES")
else:
    print("NO")

Fixed code:
n, k = map(int, input().split())
if n % 2 == 0:
    print('YES' if n//2 >= k else 'NO')
else:
    print('YES' if n//2+1 >= k else 'NO')
Buggy code:
N, K = map(int,input().split())
if N + 1 // 2 >= K: print("YES")
else: print("NO")  

Fixed code:
N, K = map(int,input().split())
if (N + 1) // 2 >= K: print("YES")
else: print("NO")
Buggy code:
n, k = map(int, input().split())
print("YES" if n >= 1+2*k else "NO")

Fixed code:
n,k=map(int,input().split())
print('YES' if n>=2*k-1 else 'NO')
Buggy code:
h, w = map(int, input().split())
if h%2==0:
    a=h//2
    if h>=w:
        print("YES")
    else:
        print("NO")
else:
    a=h//2+1
    if h>=w:
        print("YES")
    else:
        print("NO")

Fixed code:
h, w = map(int, input().split())
if h%2==0:
    a=h//2
    if a>=w:
        print("YES")
    else:
        print("NO")
else:
    a=h//2+1
    if a>=w:
        print("YES")
    else:
        print("NO")
Buggy code:
print("YNEOS"[::2])print("YNEOS"[eval(input().replace(" ","<")+"*2-1")::2])

Fixed code:
print("YNEOS"[eval(input().replace(" ","<-1+2*"))::2])
Buggy code:
N,K = map(int,input().split())

if (N+1)/2 > K:
    print('YES')
else:
    print('NO')
    

Fixed code:
N, K = map(int, input().split())

if (N + 1) / K < 2:
    print('NO')
else:
    print('YES')
Buggy code:
N, K = map(int, input().split())

elif len(list(range(1, N+1, 2))) >= K:
    print('YES')
else:
    print('NO')


Fixed code:
N, K = map(int, input().split())

if len(list(range(1, N+1, 2))) >= K:
    print('YES')
else:
    print('NO')