qyliang/CodeNanoFix huggingface dataset:
Buggy code:
li = [0,0,0,0]
for i in range(0,3):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    li[a] += 1
kisuu = 0
for i in range(0,4):
    if li[i] % 2 == 1:
        kisuu += 1
if kisuu == 2:
    print("YES")
else:
    print("NO")


Fixed code:
li = [0,0,0,0]
for i in range(0,3):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    li[a] += 1
    li[b] += 1
kisuu = 0
for i in li:
    if i % 2 == 1:
        kisuu += 1
if kisuu == 2:
    print("YES")
else:
    print("NO")
Buggy code:
lista = []
for i in range(3):
  a,b = map(int,input().split()))
  lista.append(a)
  lista.append(b)
l1 = 0
l2 = 0
l3 = 0
l4 = 0
for j in lista:
  if j == 1:
    l1 += 1
  if j == 2:
    l2 += 1
  if j == 3:
    l3 += 1
  if j == 4:
    l4 += 1
c = l1%2 + l2%2 + l3%2 + l4%2
if c%2 == 0:
  print('YES')
else:
  print('NO')
  


Fixed code:
lista = []
for i in range(3):
  a,b = map(int,input().split())
  lista.append(a)
  lista.append(b)
l1 = 0
l2 = 0
l3 = 0
l4 = 0
for j in lista:
  if j == 1:
    l1 += 1
  if j == 2:
    l2 += 1
  if j == 3:
    l3 += 1
  if j == 4:
    l4 += 1
c = (l1)%2 + (l2)%2 + (l3)%2 + (l4)%2
if c <= 2:
  print('YES')
else:
  print('NO')
Buggy code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

z = []
for i in range(3):
    a,b = inpl()
    z.append(a)
    z.append(b)
c = Counter(z)
for key in c.keys():
    if c[key] > 2:
        print('No')
        break
else:
    print('Yes')


Fixed code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

z = []
for i in range(3):
    a,b = inpl()
    z.append(a)
    z.append(b)
c = Counter(z)
for key in c.keys():
    if c[key] > 2:
        print('NO')
        break
else:
    print('YES')
Buggy code:
I=input;s=I()+I()+I();print("YNEOS"[any(s.count(x)>1for x in "1234")::2])

Fixed code:
I=input;s=I()+I()+I();print("YNEOS"[any(s.count(x)>2for x in"1234")::2])
Buggy code:
ans=[0]*4

for i in range(3):
    a,b=map(int,input())
    ans[a-1]+=1
    ans[b-1]+=1

f1=0
f2=0
for i in range(4):
    if ans[i]==1:
        f1+=1
    if ans[i]==2:
        f2+=1
if f1==2 and f2==2:
    print('YES')
else:
    print('NO')

Fixed code:
ans=[0]*4

for i in range(3):
    a,b=map(int,input().split())
    ans[a-1]+=1
    ans[b-1]+=1

f1=0
f2=0
for i in range(4):
    if ans[i]==1:
        f1+=1
    if ans[i]==2:
        f2+=1
if f1==2 and f2==2:
    print('YES')
else:
    print('NO')
Buggy code:
ans = [0, 0, 0, 0]
for i in range(3):
	x = list(map(int, input().split()))
	for xi in x:
		ans[xi] += 1
if sorted(ans) == [1, 1, 2, 2]:
	print("YES")
else:
	print("NO")


Fixed code:
ans = [0, 0, 0, 0]
for i in range(3):
	x = list(map(int, input().split()))
	for xi in x:
		ans[xi - 1] += 1
if sorted(ans) == [1, 1, 2, 2]:
	print("YES")
else:
	print("NO")
Buggy code:
d=[0 for in range(4)]
for i in range(3):
  a,b=map(int,input().split())
  d[a-1]+=1
  d[b-1]+=1
print(("NO","YES")[d.count(1)==2 and d.count(2)==2])

Fixed code:
d=[0]*4
for i in range(3):
    a,b=map(int,input().split())
    d[a-1]+=1
    d[b-1]+=1
d.sort()
print(["NO","YES"][d[0]==d[1]==1 and d[2]==d[3]==2])
Buggy code:
from collections import Counter
cnt = Counter()
for i in range(3):
  cnt.update([int(item) for item in input().split()])
a = cnt.values()
a.sort()
if a[0] == 1 and a[1] == 1 and a[2] == 2 and a[3] == 2:
  print("YES")
else:
  print("NO")

Fixed code:
from collections import Counter
cnt = Counter()
for i in range(3):
  cnt.update([int(item) for item in input().split()])
a = list(cnt.values())
a.sort()
if a[0] == 1 and a[1] == 1 and a[2] == 2 and a[3] == 2:
  print("YES")
else:
  print("NO")
Buggy code:
lis = [map(int, input().split()) for _ in range(3)]

ans = "YES"

for i in range(4):
  a = lis.count(i+1)
  if a >= 3:
    ans = "NO"
    break
print(ans)

Fixed code:
lis = []
for i in range(3):
  lis = lis + list(map(int, input().split()))
#print(lis)

ans = "YES"

for i in range(4):
  a = lis.count(i+1)
  if a >= 3:
    ans = "NO"
    break
print(ans)
Buggy code:
a = [0]*4
for i in range(3):
  x,y = map(int,input().split())
  a[x] += 1
  a[y] += 1
if sorted(a) = [1,1,2,2]:
  print("YES")
else:
  print("NO")

Fixed code:
a = [0] * 4
for i in range(3) :
  x, y = map(int, input().split())
  a[x-1] = a[x-1] + 1
  a[y-1] = a[y-1] + 1
if a[0] ^ a[1] ^ a[2] ^ a[3] == 0 : print("YES")
else : print("NO")
Buggy code:
p = [0,0,0,0]
for i in range(3):
    ai, bi = map(int, input().split())
    p[ai-1] += 1
    p[bi-1] += 1

if 3 in p:
    print('YES')
else:
    print('NO')


Fixed code:
p = [0,0,0,0]
for i in range(3):
    ai, bi = map(int, input().split())
    p[ai-1] += 1
    p[bi-1] += 1

if 3 in p:
    print('NO')
else:
    print('YES')
Buggy code:
list_ = [[int(x) for x in input().split()] for i in range(3)]
count = [0]*4
for i in range(3):
  count[list_[i][0]-1]+=1
  count[list_[i][1]-1]+=1
print(count)
if 3 in count:
  print('NO')
else:
  print('YES')

Fixed code:
list_ = [[int(x) for x in input().split()] for i in range(3)]
count = [0]*4
for i in range(3):
  count[list_[i][0]-1]+=1
  count[list_[i][1]-1]+=1
if 3 in count:
  print('NO')
else:
  print('YES')
Buggy code:
edges = [map(int, input().split()) for _ in range(3)]

flattened = [i for sub in edges for i in sub]
cont = sorted([flattened.count(i) for i in range(4)])
ans = 'YES' if cont = [1,1,2,2] else 'NO'

Fixed code:
edges = [map(int, input().split()) for _ in range(3)]

flattened = [i for sub in edges for i in sub]
cont = sorted([flattened.count(i) for i in range(1, 5)])
ans = 'YES' if cont == [1,1,2,2] else 'NO'
print(ans)
Buggy code:
count1=0
count2=0
count3=0
count4=0
for i in range(3):
  a,b=(int(x) for x in input().split())
  if a==1 or b==1:
    count1 = count1 + 1
  elif a==2 or b==2:
    count2 = count2 + 1
  elif a==3 or b==3:
    count3 = count3 + 1
  elif a==4 or b==4:
    count4 = count4 + 1
if count1>2 or count2>2 or count3>2 or count4>2:
  print("NO")
else:
  print("YES")

Fixed code:
count1=0
count2=0
count3=0
count4=0
for i in range(3):
  a,b=(int(x) for x in input().split())
  if a==1:
    count1 = count1 + 1
  elif a==2:
    count2 = count2 + 1
  elif a==3:
    count3 = count3 + 1
  elif a==4:
    count4 = count4 + 1
  if b==1:
    count1 = count1 + 1
  elif b==2:
    count2 = count2 + 1
  elif b==3:
    count3 = count3 + 1
  elif b==4:
    count4 = count4 + 1
if count1>2 or count2>2 or count3>2 or count4>2:
  print("NO")
else:
  print("YES")
Buggy code:
def solution(edges):
    num_of_neighbor = {}
    for e in edges:
        if e[0] in num_of_neighbor:
            num_of_neighbor[e[0]] += 1
        else:
            num_of_neighbor[e[0]] = 1
        if e[1] in num_of_neighbor:
            num_of_neighbor[e[1]] += 1
        else:
            num_of_neighbor[e[1]] = 1
    n_2 = 0
    n_1 = 0
    for n in num_of_neighbor:
        if num_of_neighbor[n] == 2:
            n_2 += 1
        elif num_of_neighbor[n] == 1:
            n_1 += 1

        if n_2 == 2 and n_1 == 2:
            return 'YES'
        else:
            return 'NO'




e1 = [int(s) for s in input().split(' ')]
e2 = [int(s) for s in input().split(' ')]
e3 = [int(s) for s in input().split(' ')]
edges = [e1, e2, e3]
print(solution(table))

Fixed code:
def solution(edges):
    num_of_neighbor = {}
    for e in edges:
        if e[0] in num_of_neighbor:
            num_of_neighbor[e[0]] += 1
        else:
            num_of_neighbor[e[0]] = 1
        if e[1] in num_of_neighbor:
            num_of_neighbor[e[1]] += 1
        else:
            num_of_neighbor[e[1]] = 1
    n_2 = 0
    n_1 = 0
    for n in num_of_neighbor:
        if num_of_neighbor[n] == 2:
            n_2 += 1
        elif num_of_neighbor[n] == 1:
            n_1 += 1

    if n_2 == 2 and n_1 == 2:
        return 'YES'
    else:
        return 'NO'

e1 = [int(s) for s in input().split(' ')]
e2 = [int(s) for s in input().split(' ')]
e3 = [int(s) for s in input().split(' ')]
edges = [e1, e2, e3]
print(solution(edges))
Buggy code:
def solution(path1, path2, path3):
    counts = [0, 0, 0, 0]
    paths = [path1, path2, path3]
    for path in paths:
        counts[path[0]] += 1
        counts[path[1]] += 1

    countsOfCounts = [0, 0]
    for count in counts:
        if count == 1:
            if countsOfCounts[0] == 2:
                return "NO"
            countsOfCounts[0] += 1
        elif count == 2:
            if countsOfCounts[1] == 2:
                return "NO"
            countsOfCounts[1] += 1
        else:
            return "NO"
    return "YES"


path1 = [int(s) for s in input().split(' ')]
path2 = [int(s) for s in input().split(' ')]
path3 = [int(s) for s in input().split(' ')]

print(solution(path1, path2, path3))


Fixed code:
def solution(path1, path2, path3):
    counts = [0, 0, 0, 0]
    paths = [path1, path2, path3]
    for path in paths:
        counts[path[0] - 1] += 1
        counts[path[1] - 1] += 1

    countsOfCounts = [0, 0]
    for count in counts:
        if count == 1:
            if countsOfCounts[0] == 2:
                return "NO"
            countsOfCounts[0] += 1
        elif count == 2:
            if countsOfCounts[1] == 2:
                return "NO"
            countsOfCounts[1] += 1
        else:
            return "NO"
    return "YES"


path1 = [int(s) for s in input().split(' ')]
path2 = [int(s) for s in input().split(' ')]
path3 = [int(s) for s in input().split(' ')]

print(solution(path1, path2, path3))
Buggy code:
import numpy as np
ans = 'YES'
a = np.array([])
for i in range(3):
    b, c = input().split()
    a = np.append(a, [b, c])
a = a.astype(np.int32)
for i in range(4):
    count = np.sum(a == i + 1)
    if count > 2:
        ans = 'No'
        break
print(ans)

Fixed code:
import numpy as np
ans = 'YES'
a = np.array([])
for i in range(3):
    b, c = input().split()
    a = np.append(a, [b, c])
a = a.astype(np.int32)
for i in range(4):
    count = np.sum(a == i + 1)
    if count > 2:
        ans = 'NO'
        break
print(ans)
Buggy code:
def f():
    a = list(map(int, input().split()))+list(map(int, input().split()))+list(map(int, input().split()))
    for i in range(4):
        if sum(x==i+1 for x in a):
            print('NO')
            return
    print('YES')
f()

Fixed code:
def f():
    a = list(map(int, input().split()))+list(map(int, input().split()))+list(map(int, input().split()))
    for i in range(4):
        if sum(x==i+1 for x in a) > 2:
            print('NO')
            return
    print('YES')
f()
Buggy code:
L = list(map(int,input().split()))
M = list(map(int,input().split()))
N = list(map(int,input().split()))
O = [L,M,N]
P = L.count(1)+M.count(1)+N.count(1)
Q = L.count(2)+M.count(2)+N.count(2)
R = L.count(3)+M.count(3)+N.count(3)
S = L.count(4)+M.count(4)+N.count(4)
T = [P,Q,R,S]
T.sort()
if T[0] == T[1] == 1:
  if T[2] == T[3] == 2:
    if [T[1],T[2]] in O:
      print('YES')
    else:
      print('NO')
  else:
    print('NO')
else:
  print('NO')

Fixed code:
L = list(map(int,input().split()))
M = list(map(int,input().split()))
N = list(map(int,input().split()))
O = [L,M,N]
P = L.count(1)+M.count(1)+N.count(1)
Q = L.count(2)+M.count(2)+N.count(2)
R = L.count(3)+M.count(3)+N.count(3)
S = L.count(4)+M.count(4)+N.count(4)
T = [P,Q,R,S]
T.sort()
if T[0] == T[1] == 1:
  if T[2] == T[3] == 2:
    if [T[1],T[2]] or [T[2],T[1]] in O:
      print('YES')
    else:
      print('NO')
  else:
    print('NO')
else:
  print('NO')
Buggy code:
'''input

'''
import time
import math
l = [[0] for i in range(5)]
for i in range(4):
	a, b = map(int, input().strip().split())
	l[a].append(b)
	l[b].append(a)
for i in range(1, 5):
	if(len(l[i]) > 2):
		flag = 1
		break
print("YES" if flag else "NO")

Fixed code:
'''input
4 2
1 3
2 3
'''
import time
import math
l = [[] for i in range(5)]
flag = 0
for i in range(3):
	a, b = map(int, input().strip().split())
	l[a].append(b)
	l[b].append(a)
for i in range(1, 5):
	if(len(l[i]) > 2):
		flag = 1
		break
print("YES" if not flag else "NO")
Buggy code:
data = []
for i in range(3):
    data.append(list(map(int, input().split())))
data = sum(data, [])

for i in data:
    result[i-1]+=1
if 3 in result:
    print("NO")
else:
    print("YES")

Fixed code:
data = []

for i in range(3):
    data.append(list(map(int, input().split())))
data = sum(data, [])

result = [0]*4
for i in data:
    result[i-1]+=1
if 3 in result:
    print("NO")
else:
    print("YES")
Buggy code:
ds = {}
for i in range(3):
    s = input()
    ks = [int(i) for i in s.split(' ')]
    for k in ks:
        if k in ds:
            ds[k] += 1
        else:
            ds[k] = 1


for k in ds:
    if ds[k] == 3:
        print('NO')
print('YES')



Fixed code:
ds = {}
for i in range(3):
    s = input()
    ks = [int(i) for i in s.split(' ')]
    for k in ks:
        if k in ds:
            ds[k] += 1
        else:
            ds[k] = 1


for k in ds:
    if ds[k] == 3:
        print('NO')
        exit()
print('YES')
Buggy code:
s = input()
s += input()
s += input()

if(
    not(s.count("1")!=1 or s.count("1")!=2) or 
    not(s.count("2")!=1 or s.count("2")!=2) or
    not(s.count("3")!=1 or s.count("3")!=2) or
    not(s.count("4")!=1 or s.count("4")!=2)
    ) :
    print("NO")
else:
    print("YES")

Fixed code:
s = input()
s += input()
s += input()

if(
    not(s.count("1")==1 or s.count("1")==2) or 
    not(s.count("2")==1 or s.count("2")==2) or
    not(s.count("3")==1 or s.count("3")==2) or
    not(s.count("4")==1 or s.count("4")==2)
    ) :
    print("NO")
else:
    print("YES")
Buggy code:
a_b=[]
a=[]
b=[]
judge=[]
judge_count=0
yes_no_count=0
for i in range(3):
    a_blank,b_blank=map(int,input().split())
    a.append(a_blank)
    b.append(b_blank)

a_b.extend(a)
a_b.extend(b)
for i in range(1,4+1):
    for j in a_b:
        if i==j:
            judge_count+=1
    judge.append(judge_count)
    judge_count=0

for i in judge:
    yes_no_count+=1
    if i==0 or i>=3:
        print("NO")
        break
    elif len(judge)==yes_no_count:
        print("YES")

print(yes_no_count)

Fixed code:
a_b=[]
a=[]
b=[]
judge=[]
judge_count=0
yes_no_count=0
for i in range(3):
    a_blank,b_blank=map(int,input().split())
    a.append(a_blank)
    b.append(b_blank)

a_b.extend(a)
a_b.extend(b)
for i in range(1,4+1):
    for j in a_b:
        if i==j:
            judge_count+=1
    judge.append(judge_count)
    judge_count=0

for i in judge:
    yes_no_count+=1
    if i==0 or i>=3:
        print("NO")
        break
    elif len(judge)==yes_no_count:
        print("YES")

#print(yes_no_count)
Buggy code:
import sys
input = sys.stdin.readline

nums = [0 for _ in range(4)]

for _ in range(3):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    nums[a] += 1
    nums[b] += 1

nums.sort()

if nums[0] == 1 and nums[3] == 2: 
    print("Yes")
else:
    print("NO")

Fixed code:
import sys
input = sys.stdin.readline

nums = [0 for _ in range(4)]

for _ in range(3):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    nums[a] += 1
    nums[b] += 1

nums.sort()

if nums[0] == 1 and nums[3] == 2: 
    print("YES")
else:
    print("NO")
Buggy code:
a1,b1=map(int,input().split())
a2,b3=map(int,input().split())
a2,b3=map(int,input().split())
m = [a1,b1,a2,b2,a3,b3]

n={1:0,2:0,3:0,4:0}
for x in m:
    n[x]+=1
    
t=0
for i in range(3):
    i+=1
    if n[i] != 1 and n[i] != 2:
        t=1
        
if t == 0:
    print("YES")
else:
    print("NO")


Fixed code:
a1,b1=map(int,input().split())
a2,b2=map(int,input().split())
a3,b3=map(int,input().split())
m = [a1,b1,a2,b2,a3,b3]

n={1:0,2:0,3:0,4:0}
for x in m:
    n[x]+=1
    
t=0
for i in range(4):
    i+=1
    if n[i] != 1 and n[i] != 2:
        t=1
        
if t == 0:
    print("YES")
else:
    print("NO")
Buggy code:
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if l[i] == l[i+1] == l[i+2]:
        x = False
        break

print("YES" if x == True else "No")

Fixed code:
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if l[i] == l[i+1] == l[i+2]:
        x = False

print("YES" if x == True else "NO")
Buggy code:
print('YES'if __import__('collections').Counter(map(int,open(0).read().split())).most_common[0][1]<3 else'NO')

Fixed code:
print('YES'if __import__('collections').Counter(map(int,open(0).read().split())).most_common()[0][1]<3 else'NO')
Buggy code:
ROADS = 3

range_city = list(range(1, 4+1))
appearance = []
for i in range(ROADS):
    a, b = map(int, input().split())
    appearance.append(a)
    appearance.append(b)

count = [appearance.count(city) for city in range_city]
if ROADS in count:
    print('YES')
else:
    print('NO')


Fixed code:
ROADS = 3

range_city = list(range(1, 4+1))
appearance = []
for i in range(ROADS):
    a, b = map(int, input().split())
    appearance.append(a)
    appearance.append(b)

count = [appearance.count(city) for city in range_city]
if ROADS not in count:
    print('YES')
else:
    print('NO')
Buggy code:
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())


cnt = {1: 0, 2: 0, 3: 0, 4: 0}
for i in range(4):
    if not i+1 in [a1, a2, a3, b1, b2, b3]:
        print('NO')
        exit()

lis = [a1, a2, a3, b1, b2, b3]

c = 0
for l in range(4):
    cnt = lis.count(l+1)
    if cnt > 1:
        c += 1

if c <= 2:
    print('NO')

print('YES')


Fixed code:
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())

cnt = {1: 0, 2: 0, 3: 0, 4: 0}
for i in range(4):
    if not i+1 in [a1, a2, a3, b1, b2, b3]:
        print('NO')
        exit()

lis = [a1, a2, a3, b1, b2, b3]

c = 0
for l in range(4):
    cnt = lis.count(l+1)
    if cnt > 1:
        c += 1

if c < 2:
    print('NO')
    exit()

print('YES')
Buggy code:
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if l[i] == l[i+1] == l[i+2]:
        x = False

print("YES" if x == True else "No")

Fixed code:
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if (l[i] == l[i+1]) and (l[i] == l[i+2]):
        x = False
if x == True:
    print("YES")
else:
    print("NO")
Buggy code:
inputList = []
inputList.extend(int(i) for i in input().split())
inputList.extend(int(i) for i in input().split())
inputList.extend(int(i) for i in input().split())

one = 0
two = 0
three = 0
four = 0

for i in inputList:
    if i == 1:
        one = one + 1
    elif i == 2:
        two = two + 1
    elif i == 3:
        three = three + 1
    elif i == 4:
        four = four + 1

if one >= 3 or two >= 3 or three >= 3 or four >= 3:
    print('No')
else:
    print('YES')


Fixed code:
inputList = []
inputList.extend(int(i) for i in input().split())
inputList.extend(int(i) for i in input().split())
inputList.extend(int(i) for i in input().split())

one = 0
two = 0
three = 0
four = 0

for i in inputList:
    if i == 1:
        one = one + 1
    elif i == 2:
        two = two + 1
    elif i == 3:
        three = three + 1
    elif i == 4:
        four = four + 1

if one < 1 or one >= 3 or two < 1 or  two >= 3 or three < 1 or three >= 3 or four < 1 or four >= 3:
    print('NO')
else:
    print('YES')
Buggy code:
# coding: utf-8
# Your code here!
num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,5):
    print(i)
    if num.count(i)==3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")


Fixed code:
# coding: utf-8
# Your code here!
num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,5):

    if num.count(i)==3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")
Buggy code:
a=input().split()
b=int(a[0])
c=int(a[1])
d=input().split()
e=int(d[0])
f=int(d[1])
g=input().split()
h=int(g[0])
i=int(g[1])
L=[b,c,e,f,h,i]
if L.count('1') or L.count('2') or L.count('3') or L.count('4') ==3:
    print('NO')
else:
    print('YES')

Fixed code:
a=input().split()
b=a[0]
c=a[1]
d=input().split()
e=d[0]
f=d[1]
g=input().split()
h=g[0]
i=g[1]
L=[b,c,e,f,h,i]
if L.count('1')==3 or L.count('2')==3 or L.count('3')==3 or L.count('4') ==3:
    print('NO')
else:
    print('YES')
Buggy code:
p_str = input().split()
p = [int(s) for s in p_str]
p_str = input().split()
p.extend([int(s) for s in p_str])
p.extend([int(s) for s in p_str])
#print(p)
count_list = []
for i in range(4):
   count =  p.count(i+1)
   count_list.append(count)
#print(count_list)
#==
count_list2 = []
#for j in range(2):
#   count2 = count_list2.count(j+1)
#   count_list2.append(count2)
#print(count_list2)
#==
if(count_list.count(1)==2 and count_list.count(2)==2):
   print("YES")
else:
   print("NO")

Fixed code:
p_str = input().split()
p = [int(s) for s in p_str]
p_str = input().split()
p.extend([int(s) for s in p_str])
p_str = input().split()
p.extend([int(s) for s in p_str])
#print(p)
count_list = []
for i in range(4):
   count =  p.count(i+1)
   count_list.append(count)
#print(count_list)
if(count_list.count(1)==2 and count_list.count(2)==2):
   print("YES")
else:
   print("NO")
Buggy code:
X = []
for i in range(3):
    X.append(input().split())
a1 = 0
a2 = 0
a3 = 0
a4 = 0
for i in X:
    for j in i:
        if j == "1":
            a1 = 1
        elif j == "2":
            a2 = 1
        elif j == "3":
            a3 = 1
        elif j == "4":
            a4 = 1
if a1 == 1 and a2 == 1 and a3 == 1 and a4 == 1:
    print("YES")
else:
    print("NO")

Fixed code:
X = []
for i in range(3):
    X.append(input().split())
a1 = 0
a2 = 0
a3 = 0
a4 = 0
for i in X:
    for j in i:
        if j == "1":
            a1 += 1
        elif j == "2":
            a2 += 1
        elif j == "3":
            a3 += 1
        elif j == "4":
            a4 += 1
if 1<= a1 <= 2 and 1<= a2 <= 2 and 1<= a3 <= 2 and 1<= a4 <= 2:
    print("YES")
else:
    print("NO")
Buggy code:
# -*- coding: utf-8 -*-
import numpy as np

if __name__ == "__main__":
    # input
    a = [0, 0, 0]
    b = [0, 0, 0]

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

    a.extend(b)
    a = np.array(a)

    flag = True
    for i in range(1, 5):
        num = np.sum(i == a)
        if num > 2:
            flag = False

        else:
            flag = True

    if flag is True:
        print("YES")
    else:
        print("NO")


Fixed code:
# -*- coding: utf-8 -*-
import numpy as np

if __name__ == "__main__":
    # input
    a = [0, 0, 0]
    b = [0, 0, 0]

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

    a.extend(b)
    a = np.array(a)

    flag = True
    for i in range(1, 5):
        num = np.sum(i == a)
        if num > 2:
            flag = False

        elif num == 0:
            flag = False

    if flag is True:
        print("YES")
    else:
        print("NO")