qyliang/CodeNanoFix huggingface dataset:
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())
if(2*k-1>n):
  print("NO")
else:
  print("YES")
Buggy code:
N, K = map(int,input().split())
if N + 1 >= 2 * K:
    print('YES')
ele:
    print('NO')

Fixed code:
N, K = map(int,input().split())
if N + 1 >= 2 * K:
    print('YES')
else:
    print('NO')
Buggy code:
#!/usr/bin/env python3

N,K = map(int, input().split())

if (N-1) > 2*(K-1):
    print("YES")
else:
    print("NO")


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

N,K = map(int, input().split())

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

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

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

if N >= 1+(2*(K-1)):
    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:
a,b = list(map(int, input().split()))
if ((a + 1 / 2) >= b): print("YES")
else: print("NO")

Fixed code:
a,b = list(map(int, input().split()))
if a % 2 == 0:
    if a / 2 >= b:
        print("YES")
    else:
        print("NO")
else:
    if (a + 1) / 2 >= b:
        print("YES")
    else:
        print("NO")
Buggy code:
import numpy as np
n, k = (int(x) for x in input().split())
if n%2==0:
  if k <= n/2.0
  print("YES")
else:
  print("NO")
if n%2!=0:
  if k <= np.ceil(n/2.0)
  print("YES")
else:
  print("NO")


Fixed code:
import numpy as np
n, k = (int(x) for x in input().split())
if n%2==0:
  if k <= n/2:
    print("YES")
  else:
    print("NO")
if n%2!=0:
  if k <= np.ceil(n/2):
    print("YES")
  else:
    print("NO")
Buggy code:
import math
import copy
import bisect








def nCast(number):
    if type(number)==str:
        return int(number)
    for idx in range(0,len(number)):
        if type(number[idx])==str:

            number[idx]=int(number[idx])
        else:
            nCast(number[idx])
    return number
    
def inputArr(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
def inputArr1(w):
    l=list()
    for idx in range(0,w):
        l.append(input().split())
    return l

n=nCast(input().split())



def func():
    if n[0]%2!=0:
        n[0]+=1
    if n[1]*2==n[0]:
        return "YES"
    else:
        return "NO"
    
print(func()) 







Fixed code:
import math
import copy
import bisect








def nCast(number):
    if type(number)==str:
        return int(number)
    for idx in range(0,len(number)):
        if type(number[idx])==str:

            number[idx]=int(number[idx])
        else:
            nCast(number[idx])
    return number
    
def inputArr(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
def inputArr1(w):
    l=list()
    for idx in range(0,w):
        l.append(input().split())
    return l

n=nCast(input().split())

def func():
    if n[1]==1:
        return "YES"
    if n[0]%2!=0:
        n[0]=n[0]+1
    if n[1]*2<=n[0]:
        return "YES"
    else:
        return "NO"
    
print(func())
Buggy code:
# A Anti-Adjacency
n,k = map(int,input().split())
if int(n +1 / 2) >= k:
    print('YES')
else:
    print('NO')

Fixed code:
# A Anti-Adjacency
n,k = map(int,input().split())
if int((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())
ans = 0
for i in range(1, n+1, 2):
    ans += 1
if ans >= k:
    print("YES")
else:
    print("No")

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

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

Fixed code:
a=input()
N=int(a.split()[0])
K=int(a.split()[1])

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


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

Fixed code:
N,K=map(int,input().split())
print('YNEOS'[2*K-1>N::2])
Buggy code:
N, K = map(int, input().split())

ans = []
for i in range(1, N + 1):
    ans.append(i)

if len(ans) >= K:
    print("YES")
else:
    print("NO")

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

ans = []
for i in range(1, N + 1, 2):
    ans.append(i)

if len(ans) >= K:
    print("YES")
else:
    print("NO")
Buggy code:
a,b=map(int,input().split())
if a/b >= 2:
  print('YES')
else:
  print('NO')

Fixed code:
a,b=map(int,input().split())
if (a+1)/b >= 2:
  print('YES')
else:
  print('NO')
Buggy code:
# 2019/02/09
# Minnano Procon 2019 - A

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

# Calc
wn = int(n / 2 + 0.5)
print(wn)

if wn >= k:
    ans = "YES"
else:
    ans = "NO"

# Output
print(ans)

Fixed code:
# 2019/02/09
# Minnano Procon 2019 - A

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

# Calc
wn = int(n / 2 + 0.5)

if wn >= k:
    ans = "YES"
else:
    ans = "NO"

# Output
print(ans)
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())
x = (N + 1) // 2
if x >= K:
    print("YES")
else:
    print("NO")
Buggy code:
n, k = map(int, input().split())
if n-2*k>0:
    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())
ans='NO'
if k<=(n+1)//2:
  ans='YES'
print(ans)

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

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

if (k<=cnt):
  print("YES")
else:
  print("NO")

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

if k <= cnt:
  print("YES")
else:
  print("NO")
Buggy code:
a = list(map(int, input().split()))
print('YES' if (a[0]+1)/2 >= a[1] else 'No')

Fixed code:
a = list(map(int, input().split()))
print('YES' if (a[0]+1)/2 >= a[1] else 'NO')
Buggy code:
n,k=map(int,input().split())
if k-n>=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 >= round(N/2):
    print('NO')
else:
    print('YES')

Fixed code:
N, K = map(int, input().split())
if K > round(N/2):
    if N == 1 and K == 1:
        print('YES')
    else:
        print('NO')
else:
    print('YES')
Buggy code:
in_list = input().split()
n = int(in_list[0])
k = int(in_list[1])
if(1+2*k<=n):
   print("YES")
else:
   print("NO")

Fixed code:
in_list = input().split()
n = int(in_list[0])
k = int(in_list[1])
if(1+2*(k-1)<=n):
   print("YES")
else:
   print("NO")
Buggy code:
n,k = list(map(int,input().split()))

nn = 1
count_n = 1
while nn < n:
    nn += 2
    count_n += 1
    
if n,k == 2,2:
    print("NO")
elif count_n >= k:
    print("YES")
elif count_n < k:
    print("NO")

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

count_n = 1
while n > 2:
    n -= 2
    count_n += 1
    
if count_n >= k:
    print("YES")
elif count_n < k:
    print("NO")
Buggy code:

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


if n-1==1:
    print("NO")
else:
    if n%2==1:
        if (n-1)/2 >= 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 == 1:
    if (n+1)/2 >= k:
        print("YES")
    else:
        print("NO")
else:
    if n/2 >= k:
        print("YES")
    else:
        print("NO")
Buggy code:
n,m = list(map(int,input().split()))
if m*2+1 <= n:
  print("YES")
else:
  print("NO")

Fixed code:
n,m = list(map(int,input().split()))
if m*2-1 <= 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 int((n+1)/2) >= k:
    print('YES')
else:
    print('NO')
Buggy code:
import math
N, K = map(int, input().split())
if math.ceil(N // 2) >= K:
  print('YES')
else:
  print('NO')

Fixed code:
import math
N, K = map(int, input().split())
if math.ceil(N / 2) >= K:
  print('YES')
else:
  print('NO')
Buggy code:
n,k=map(int,input(),split())
if n%2==0:
    if n/2>=k:
        print('YES')
    else:
        print('NO')
else:
    if (n//2)+1>=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//2)+1>=k:
        print('YES')
    else:
        print('NO')
Buggy code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	#a = int(input())
	#b , c = tin()
	#s = input()
	b, c= tin()
	return 'Yes' if b >= (c*2)-1 else 'No'
	
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Fixed code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	#a = int(input())
	#b , c = tin()
	#s = input()
	b, c= tin()
	return 'YES' if (b + 1) // 2 >= c else 'NO'
	
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)
Buggy code:
import math
n,k=map(int,input().split())
xx=math.ceil(n//2)
if xx>=k:
	print("YES")
else:
	print("NO")

Fixed code:
import math
n,k=map(int,input().split())
xx=math.ceil(n/2)
if xx>=k:
	print("YES")
else:
	print("NO")
Buggy code:
a=input().split()
b=int(a[0])
c=int(a[1])
if b>=(c-1)/2:
    print('YES')
else:
    print('NO')

Fixed code:
a=input().split()
b=int(a[0])
c=int(a[1])
if (b+1)/2>=c:
    print('YES')
else:
    print('NO')
Buggy code:
N,K=int(input().split())
if K>=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())
print('NO' if n<2*k else 'YES')

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

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

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

print('YES' if n//2>=k else 'NO')


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

print('YES' if (n+1)//2 >= k else 'NO')
Buggy code:
nk = list(map(int,input().split()))
n=nk[0]
k=nk[1]
if n >= 2*k+1:
    print('YES')
else:
    print('NO')


Fixed code:
nk = list(map(int,input().split()))
n=nk[0]
k=nk[1]
if n >= 2*k-1:
    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("NO")
else:
  print("YES")
Buggy code:
N, K = map(int, input().split())
temp = -1
if N % 2 != 0:
  temp = (N+1)//2
else:
  temp = N // 2
if K >= temp:
  print('YES')
else:
  print('NO')

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


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


def solution(N, K):
    if (math.ceil((N + 1) / 2) >= K):
        return "YES"
    else:
        return "NO"


n, k = [int(s) for s in input().split(' ')]
solution(n, k)


Fixed code:
import math


def solution(N, K):
    if (math.floor((N + 1) / 2) >= K):
        return "YES"
    else:
        return "NO"


n, k = [int(s) for s in input().split(' ')]
print(solution(n, k))
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())
if (n-1)//2 < k:
  print("YES")
else:
  print("NO")

Fixed code:
n,k=map(int,input().split())
if k*2-1 <= n:
    print('YES')
else:
    print('NO')
Buggy code:
#!/usr/bin/env python3
import sys

YES = "YES"  # type: str
NO = "NO"  # type: str


def solve(N: int, K: int):
 	from math import ceil
    if(ceil(N/2) >= K):
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.5.3 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(N, K)

if __name__ == '__main__':
    main()


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

YES = "YES"  # type: str
NO = "NO"  # type: str


def solve(N: int, K: int):
    from math import ceil
    if(ceil(N/2) >= K):
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(N, K)

if __name__ == '__main__':
    main()
Buggy code:
n,k=map(int,input().split())
if(n%2==2):
  if(n/2>k):
    print("YES")
else:
  if(n/2+1>k):
    print("NO")

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

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

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

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())
k = (k+1)//2
if n >= 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())
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 k > (n+1)//2:
  print('N0')
else:
  print('YES')

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




Fixed code:
N, K = [int(n) for n in input().split()]
answer = "YES"
if N // 2 + N % 2 >= K:
    answer = "YES"
else:
    answer = "NO"

print(answer)
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 + 1) // 2 >= K:
    print("YES")
else:
    print("NO")
Buggy code:
N, K = map(int, input().split())

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


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

if (N % 2 == 0 and N // 2 >= K) or (N % 2 == 1 and (N + 1) // 2 >= K):
    print('YES')
else:
    print('NO')
Buggy code:
N,K =[int(i)for input().split()]
if 2*K-1 <= N:
  print("YES")
else:
  print("NO")

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

if k <= n//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:
import math

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

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

Fixed code:
import math

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

if math.ceil(n/2) < k:
    print("NO")
else:
    print("YES")
Buggy code:
a = [0]*5
for i in range(3):
  x,y = map(int,input().split())
  a[x] += 1
  a[y] += 1
if sorted(a) = [0,1,1,2,2]:
  print("YES")
else:
  print("NO")

Fixed code:
a = [0]*5
for i in range(3):
    x,y = map(int,input().split())
    a[x] += 1
    a[y] += 1
    
if max(a) <= 2:
    print("YES")
else:
    print("NO")
Buggy code:
l = []

for i in range(3):
    l += list(map(int, input().split()))
print(l)

for i in range(4):
    if l.count(i) == 3:
        print('NO')
        break
else:
    print('YES')

Fixed code:
l = []

for _ in range(3):
    l += list(map(int, input().split()))

for i in range(4):
    if l.count(i + 1) == 3:
        print('NO')
        break
else:
    print('YES')
Buggy code:
from collections import Counter
import sys
A = []
for i in range(3):
    a,b = map(int,input().split())
    A.append(a)
    A.append(b)
c = Counter(A)
for i in c.values():
    if i >=2:
        print('NO')
        sys.exit()
print('YES')

Fixed code:
from collections import Counter
import sys
A = []
for i in range(3):
    a,b = map(int,input().split())
    A.append(a)
    A.append(b)
c = Counter(A)
for i in c.values():
    if i >=3:
        print('NO')
        sys.exit()
print('YES')
Buggy code:
l = []
for i in range(3):
  a,b = map(int, input().split())
  l.append(a)
  l.append(b)

for i in range(1,5):
  cnt=0
  for itm in l:
    if i==l:
      cnt+=1
  if cnt>=3:
    print("NO")
 	exit()
print("YES")
  	
  

Fixed code:
l = []
for i in range(3):
  a,b = map(int, input().split())
  l.append(a)
  l.append(b)

for i in range(1,5):
  cnt=0
  for itm in l:
    if i==itm:
      cnt+=1
  if cnt>=3:
    print("NO")
    exit()
print("YES")
Buggy code:
from collections import deque
S = [list(map(int, input().split())) for _ in range(3)]
S.sort()
l=[0,0,0,0]

for i in range(3):
    for j in range(2):
        l[S[i][j]-1]+=1
print(l)
if max(l)==3:
    print("NO")
else:
    print("YES")

Fixed code:
from collections import deque
S = [list(map(int, input().split())) for _ in range(3)]

l=[0,0,0,0]

for i in range(3):
    for j in range(2):
        l[S[i][j]-1]+=1
#print(l)
if max(l)==3:
    print("NO")
else:
    print("YES")
Buggy code:
abl = [map(int,input().split()) for nesya in range(3)]
s = [1,1,2,2,3,3,4,4]
c = 0
for ab in abl:
  for n in ab:
    if n in abl:
      s.remove(n)
    else:
      c += 1
if c == 0:
  print('YES')
else:
  print('NO')

Fixed code:
abl = [map(int,input().split()) for nesya in range(3)]
s = [1,1,2,2,3,3,4,4]
c = 0
for ab in abl:
  for n in ab:
    if n in s:
      s.remove(n)
    else:
      c += 1
if c == 0:
  print('YES')
else:
  print('NO')
Buggy code:
n = 3
num_list = [list(map(int, input().split())) for _ in range(n)]
N = (sum(num_list, []))
N1 = N.count(1)
N2 = N.count(2)
N3 = N.count(3)
N4= N.count(4)
if (N1 or N2 or N3 or N4) > 3:
    print('NO')
else:
    print('YES')


Fixed code:
n = 3
num_list = [list(map(int, input().split())) for _ in range(n)]
N = (sum(num_list, []))
N1 = N.count(1)
N2 = N.count(2)
N3 = N.count(3)
N4= N.count(4)
if N1 > 2 or N2 > 2 or N3 > 2 or N3 > 2 or N4 > 2:
    print('NO')
else:
    print('YES')
Buggy code:
L = [map(int,input().split()) for _ in range(3)]
L.sort()
M = []
a = L.count('1')
b = L.count('2')
c = L.count('3')
d = L.count('4')
M.append(a)
M.append(b)
M.append(c)
M.append(d)
M.sort()
if M == [1,1,2,2]:
  print('YES')
else:
  print('NO')

Fixed code:
L = []
for _ in range(3):
  A,B = map(int,input().split()) 
  L.append(A)
  L.append(B)
L.sort()
M = []
a = L.count(1)
b = L.count(2)
c = L.count(3)
d = L.count(4)
M.append(a)
M.append(b)
M.append(c)
M.append(d)
M.sort()
if M == [1,1,2,2]:
  print('YES')
else:
  print('NO')
Buggy code:
from collections import*
print("YNEOS"[Counter(open(0).read().split()).most_common()[0][1]!=3::2])

Fixed code:
from collections import*
print("YNEOS"[Counter(open(0).read().split()).most_common()[0][1]==3::2])
Buggy code:
import sys
def input(): return sys.stdin.readline().rstrip()
from collections import Counter
def main():
    N=[]
    for _ in range(3):
        a,b=map(int,input().split())
        N.append(a)
        N.append(b)
    print(N)
    N=Counter(N)
    print(N)
    NN=N.most_common(1)
    print(NN)
    if NN[0][1]==3:
        print("NO")
    else:
        print("YES")


if __name__=='__main__':
    main()

Fixed code:
import sys
def input(): return sys.stdin.readline().rstrip()
from collections import Counter
def main():
    N=[]
    for _ in range(3):
        a,b=map(int,input().split())
        N.append(a)
        N.append(b)
    N=Counter(N)
    NN=N.most_common(1)
    if NN[0][1]==3:
        print("NO")
    else:
        print("YES")


if __name__=='__main__':
    main()
Buggy code:
ret = []
for i in range(3):
  ret+=list(map(int,input().split()))
ret.sort()
if ret.count(1)==2 and ret.count(2)==2 and ret.count(3)==2 and ret.count(4)==2:
  print('YES')
else:
  print('NO')

Fixed code:
ret = []
for i in range(3):
  ret+=list(map(int,input().split()))
ret.sort()
if ret.count(1)==3 or ret.count(2)==3 or ret.count(3)==3 or ret.count(4)==3:
  print('NO')
else:
  print('YES')
Buggy code:
def pin(type=int):
  return map(type,input().split())
counter = [0]*4
for i in range(3):
  a,b=pin()
  counter[a]+=1
  counter[b]+=1
ans=1
for j in counter:
  if j>3 or j<1:
    ans=0
print(["NO","YES"][ans])
    
	

Fixed code:
def pin(type=int):
  return map(type,input().split())
counter = [0]*4
for i in range(3):
  a,b=pin()
  counter[a-1]+=1
  counter[b-1]+=1
ans=1
for j in counter:
  if j>2 or j<1:
    ans=0
print(["NO","YES"][ans])