qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n1,n2,n3,n4=map(int,input().split())
t=[n1,n2,n3,n4]
t.sort()
print(t)
if t[0]==1 and t[1]==4 and t[2]==7 and t[3]==9:
  print("YES")
else:
  print("NO")

Fixed code:
n1,n2,n3,n4=map(int,input().split())
t=[n1,n2,n3,n4]
t.sort()
if t[0]==1 and t[1]==4 and t[2]==7 and t[3]==9:
  print("YES")
else:
  print("NO")
Buggy code:
n = int(input.()split())
if 1 in n and 9 in n and 7 in n and 4 in n:
  print("YES")
else:
  print("NO")

Fixed code:
n = input().split()
print('YES' if ('1' in n) and ('9' in n) and ('7' in n) and ('4' in n) else 'NO')
Buggy code:
s = list(map(int,input().split()))

c = [1,,4,7,9]

if s == c:
    print('YES')
else:
    print('NO')

Fixed code:
s = list(map(int,input().split()))
s.sort()
c = [1,4,7,9]

if s == c:
    print('YES')
else:
    print('NO')
Buggy code:
n1, n2, n3, n4=map(int,input().split())
n=[]
n.append(n1, n2, n3, n4)
if 1, ,7 ,9, 4 in n:
  print('YES')
else:
  print('NO')

Fixed code:
n1, n2, n3, n4=map(int,input().split())
n=[]
n.append(n1)
n.append(n2)
n.append(n3)
n.append(n4)
if 1 in n and 7 in n and 9 in n and 4 in n:
  print('YES')
else:
  print('NO')
Buggy code:
n = list(input().split())
print(n)

if n in ('1'):
    if n in ('9'):
        if n in ('7'):
            if n in ('4'):
                print('YES')
                exit(0)

print('NO')

Fixed code:
n = list(input().split())

if '1' in n:
    if '9' in n:
        if '7' in n:
            if '4' in n:
                print('YES')
                exit(0)

print('NO')
Buggy code:
li = list(map(int, input().split()))
if (li in 1) and (li in 9) and (li in 7) and (li in 4):
  print('YES')
else:
  print('NO')


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

if li.count(1) == 1 and li.count(9) == 1 and li.count(7) == 1 and li.count(4) == 1:
    print("YES")
else:
    print("NO")
Buggy code:
n = set(map(int,input().split()))
print('YNeos'[n!={1,9,7,4}::2])

Fixed code:
n = set(map(int,input().split()))
print('YNEOS'[n!={1,9,7,4}::2])
Buggy code:
n=list(int,input().split())
if n==[1,4,7,9]:
  print("YES")
else:
  print("NO")



Fixed code:
n = list(input().split())
n.sort()
if n == ["1","4","7","9"]:
    print("YES")
    
else:
    print("NO")
Buggy code:
n = list(map(int,input().split()))
n.sort()
ans = ''.join(n)

if ans == 1479:
    print('YES')
else:
    print('NO')

Fixed code:
n = list(map(str,input().split()))
n.sort()
ans = ''.join(n)

if ans == '1479':
    print('YES')
else:
    print('NO')
Buggy code:
A = list(map(int, input().split()))
A1 = A.count("1")
A9 = A.count("9")
A7 = A.count("7")
A4 = A.count("4")
if A1 == A9 == A7 == A4 == 1:
  print("YES")
else:
  print("NO")

Fixed code:
A = list(map(int, input().split()))
A1 = A.count(1)
A9 = A.count(9)
A7 = A.count(7)
A4 = A.count(4)
if A1 == A9 == A7 == A4 == 1:
  print("YES")
else:
  print("NO")
Buggy code:
def resolve():
   l=list(map(int, input().split()))
   if 1 in l and 9 in l and 7 in l and 4 in l:
       print('YES')
   else:
       print('NO')


Fixed code:
def resolve():
   l=list(map(int, input().split()))
   if 1 in l and 9 in l and 7 in l and 4 in l:
       print('YES')
   else:
       print('NO')
resolve()
Buggy code:
A = list(map(int,input().split()))
a = A.count('1')
b = A.count('7')
c = A.count('9')
d = A.count('4')
if a == b == c == d == 1:
  print('YES')
else:
  print('NO')

Fixed code:
A = list(map(str,input().split()))
a = A.count('1')
b = A.count('7')
c = A.count('9')
d = A.count('4')
if a == b == c == d == 1:
  print('YES')
else:
  print('NO')
Buggy code:
nums = list(map(str, input().split()))
flg = False
if len(set(nums)) != 4:
    pass
else:
    for num in nums:
        if num in "1974":
            flg = True
        else:
            continue
if flg == True:
    print("YES")
else:
    print("NO")

Fixed code:
nums = list(map(str, input().split()))
flg = False
if len(set(nums)) != 4:
    pass
else:
    for num in nums:
        if num in "1974":
            flg = True
        else:
            flg = False
            break
if flg == True:
    print("YES")
else:
    print("NO")
Buggy code:
n = list(map(int,input().split()))

for i in range(len(n)):
    if n[i]=="1":
        for j in range(n):
            if n[j]=="9":
                for j in range(n):
                    if n[i]=="7":
                        for j in range(n):
                            if n[i]=="4":
                                print("YES")
                                exit()
print("NO")


                

Fixed code:
a = list(map(int, input().split()))
n = [1,9,7,4]

for i in range(len(n)):
	if not(n[i] in a):
		print("NO")
		exit()

print("YES")
Buggy code:
import sys
if sys.platform =='ios':
	sys.stdin=open('input.txt')
	
l = list(map(int,input().split()))

l.sort()

print(''.join(list(map(str, l))))

if ''.join(list(map(str, l)))=='1479':
	print('YES')
else:
	print('No')

Fixed code:
import sys
if sys.platform =='ios':
	sys.stdin=open('input.txt')

l = list(map(int,input().split()))

l.sort()

#print(''.join(list(map(str, l))))

if ''.join(list(map(str, l)))=='1479':
	print('YES')
else:
	print('NO')
Buggy code:
l = [1, 9, 7, 4]

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

if ( a in l && b in l && c in l && d in l):
  print("YES")
else:
  print("NO")



Fixed code:
a,b,c,d=map(int, input().split())
l=[a,b,c,d]
if 1 in l and 9 in l and 7 in l and 4 in l:
	print('YES')
else:
	print('NO')
Buggy code:
N=list(map(int,input().split()))
print("YES" if len(set(N))==4 and (1 in N or 9 in N or 7 in N or 4 in N) else "NO")

Fixed code:
N = list(map(int, input().split()))
print("YES" if len(set(N)) == 4 and 1 in N and 9 in N and 7 in N and 4 in N else "NO")
Buggy code:
n = list(map(int,input().split()))
if n.sorted() == [1,4,7,9]:
  print("YES")
else:
  print("NO")

Fixed code:
n = sorted(map(int, input().split()))
print("YES" if n == [1, 4, 7, 9] else "NO")
Buggy code:
n=list(map(int,input().split()))
n.sort()
if n==['1','4','7','9']:
  print('YES')
else:
  print('NO')


Fixed code:
n=list(map(int,input().split()))
n.sort()
ans='NO'
if n==[1,4,7,9]:
    ans='YES'
print(ans)
Buggy code:
N = map(int,input().rstrip().split())
x = 0
if 1 in N:
  x = x + 1
if 9 in N:
  x = x + 1
if 7 in N:
  x = x + 1
if 4 in N:
  x = x + 1
if x == 4:
  print('YES')
else:
  print('NO')

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

x = 0
if 1 in N:
  x = x + 1
if 9 in N:
  x = x + 1
if 7 in N:
  x = x + 1
if 4 in N:
  x = x + 1
if x == 4:
  print('YES')
else:
  print('NO')
Buggy code:
N = [int(i) in input().split()]
res = "NO"
if 1 in N and 9 in N and 7 in N and 4 in N:
  res = "YES"

print(res)

Fixed code:
N = [int(i)for i in input().split()]
res = "NO"
if 1 in N and 9 in N and 7 in N and 4 in N:
  res = "YES"

print(res)
Buggy code:
a,b,c,d=map(int,input().split())
arr[a,b,c,d]
if arr.count('1')==1 and arr.count('9')==1 and arr.count('7')==1 and arr.count('4')==1:
  print('YES')
else:
  print('NO')

Fixed code:
a,b,c,d=map(int,input().split())
arr=[a,b,c,d]
if (arr.count(1)==1 and arr.count(9)==1) and (arr.count(7)==1 and arr.count(4)==1):
  print('YES')
else:
  print('NO')
Buggy code:
N = [int(_) for _ in input().split()]
S = "".join(sorted(N))
print("YES" if S == 1479 else "NO")

Fixed code:
N = [str(_) for _ in input().split()]
S = "".join(sorted(N))
print("YES" if S == '1479' else "NO")
Buggy code:
get=input()
flg=0
for a in get.split():
  if int(a) in[1,9,7,4]
	flg+=1

 if flg==4:
  print("YES")
 else:
  print("NO")

Fixed code:
get=input()
get = get.split(" ")
flg=0
get=list(set(get))
for a in get:
  if int(a) in[1,9,7,4]:
    flg+=1
    
if flg==4:
  print("YES")
else:
  print("NO")
Buggy code:
def data_input():
    a,b,c,d = input().split(' ')
    return (a,b,c,d)
def answer():
    a,b,c,d = data_input()
    s = '1974'
    s = s.replace(a,'').replace(b,'').replace(c,'').replace(d,'')
    if len(s) == 0:
      print('YES')
    print('NO')
answer()

Fixed code:
def data_input():
    a,b,c,d = input().split(' ')
    return (a,b,c,d)
def answer():
    a,b,c,d = data_input()
    s = '1974'
    s = s.replace(a,'').replace(b,'').replace(c,'').replace(d,'')
    if len(s) == 0:
        print('YES')
    else:
        print('NO')
answer()
Buggy code:
def checkInput(inputList):
    a = 0
    b = 0
    c = 0
    d = 0
    for num in inputList:
        if(num == 1):
            a = 1
        elif(num == 9):
            b = 1
        elif(num == 7):
            c = 1
        elif(num == 4):
            d = 1
    if(a == 1 and b == 1 and c == 1 and d == 1):
        return True
    else:
        return False

if __name__ == '__main__':
    inp = list(map(int,input().split()))
    if(checkInput(inp)):
        print("Yes")
    else:
        print("No")


Fixed code:
def checkInput(inputList):
    a = 0
    b = 0
    c = 0
    d = 0
    for num in inputList:
        if(num == 1):
            a = 1
        elif(num == 9):
            b = 1
        elif(num == 7):
            c = 1
        elif(num == 4):
            d = 1
    if(a == 1 and b == 1 and c == 1 and d == 1):
        return True
    else:
        return False

if __name__ == '__main__':
    inp = list(map(int,input().split()))
    if(checkInput(inp)):
        print("YES")
    else:
        print("NO")
Buggy code:
a = [False,False,False,False]
for x in input().split():
  if(x == 1):
    a[0] =True
  else if(x == 9):
    a[1] = True
  else if(x == 4):
    a[2] = True
  else if(x == 7):
    a[3] = True

all = True
for x in a:
  all &= x

print('YES' if all else 'NO')


Fixed code:
a = [False,False,False,False]
for x in input().split():
  x = int(x)
  if(x == 1):
    a[0] = True
  elif(x == 9):
    a[1] = True
  elif(x == 4):
    a[2] = True
  elif(x == 7):
    a[3] = True
 
all = True
for x in a:
  all &= x
 
print('YES' if all else 'NO')
Buggy code:
l1  = input().split()
ar = []
for i in l1:
  l1.append(int(i))
d = {1:0,9:0,7:0,4:0}
for i in ar:
  for j in d:
    if  i == j:
      d[j] = 1
con = True
for  i in d:
  if d[i] == 0:
    con = False
    print("NO")
    break
if con:
  print("YES")
   

Fixed code:
l1  = input().split(" ")
ar = []
for i in l1:
  ar.append(int(i))
d = {1:0,9:0,7:0,4:0}
for i in ar:
  for j in d:
    if  i == j:
      d[j] = 1
con = True
for  i in d:
  if d[i] == 0:
    con = False
    print("NO")
    break
if con:
  print("YES")
Buggy code:
l = map(int, input().split())
list = [1, 4, 7, 9]
flg = True
for num in list:
  if(num in l):    
    pass
  else:
    flg = False
if(flg):
	print("YES")
else:
    print("NO")

Fixed code:
l = list(map(int, input().split()))
list = [1, 4, 7, 9]
flg = True
for num in list:
  if(num in l):    
    pass
  else:
    flg = False
if(flg):
	print("YES")
else:
    print("NO")
Buggy code:
import sys
input = sys.stdin.readline

N = list(map(int, input().split())).sorted()
if N[0] == 1 and N[1] == 4 and N[2] == 7 and N[3] == 9:
    print("YES")
else:
    print("NO")


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

N = sorted(list(map(int, input().split())))
if N[0] == 1 and N[1] == 4 and N[2] == 7 and N[3] == 9:
    print("YES")
else:
    print("NO")
Buggy code:
str_input_list = input().rstrip().split(' ')
int_input_list = []
for a in str_input_list:
    int_input_list.append(int(a))

print(int_input_list)
    
keyence_list = [1, 9, 7, 4]

print(keyence_list)

for a in range(4):
    if keyence_list[a] in int_input_list:
        keyence_list[a] = '*'

print(keyence_list)

if keyence_list == ['*', '*', '*', '*']:
    print('YES')
else:
    print('NO')

Fixed code:
str_input_list = input().rstrip().split(' ')
int_input_list = []
for a in str_input_list:
    int_input_list.append(int(a))
    
keyence_list = [1, 9, 7, 4]

for a in range(4):
    if keyence_list[a] in int_input_list:
        keyence_list[a] = '*'

if keyence_list == ['*', '*', '*', '*']:
    print('YES')
else:
    print('NO')
Buggy code:
a = list(map(int, input().split()))

if a in 1 and a in 9 and a in 7 and a in 4:
  print(YES)
else:
  print(NO)


Fixed code:

a = list(map(int,input().split()))

if 1 in a:
    if 9 in a:
        if 7 in a:
            if 4 in a:
                print("YES")
            else :
                print("NO")
        else :
            print("NO")            
    else :
        print("NO")
else :
    print("NO")
Buggy code:
print('YES' if set(map(int, input().split())) == set(1, 9, 7, 4) else 'NO')


Fixed code:
print("YES" if set(map(int, input().split())) == set([1, 7, 9, 4]) else "NO")
Buggy code:
print("YNEOS"["".join(sorted(list(input())))!="1479"::2])

Fixed code:
print('YNEOS'[''.join(sorted(input()))!='   1479'::2])
Buggy code:
f = []
f = input().split()

if '1' in f:
     if '9' in f:
          if '7' in f:
               if '4' in f:
                    print("YES")
               else:
                    print("NO")
           else:
                print("NO")
     else:
          print("NO")
else:
     print("NO")
     

Fixed code:
f = []
f = input().split()
if '1' in f:
     if '9' in f:
          if '7' in f:
               if '4' in f:
                    print("YES")
               else:
                    print("NO")
          else:
               print("NO")
     else:
          print("NO")
else:
     print("NO")
Buggy code:
n = list(map(int,input().split()))
ncheck = [1, 7, 9, 4]

flag = 'YES'
for c in ncheck:
    if not c in n:
        flag = 'No'

print(flag)


Fixed code:
n = list(map(int,input().split()))
ncheck = [1, 7, 9, 4]

flag = 'YES'
for c in ncheck:
    if not c in n:
        flag = 'NO'


print(flag)
Buggy code:
list =input().split() #
var=[]
for a in list:
  a = int(a)
  var.append(a)
flg = False

if 1 in var:
    if 9 in var:
        if 7 in var:
             if 4 in var:
                 flg = True
if flg:
    print("YES")
else:
    print("NO")
    print(list)

Fixed code:
list =input().split() #
var=[]
for a in list:
  a = int(a)
  var.append(a)
flg = False

if 1 in var:
    if 9 in var:
        if 7 in var:
             if 4 in var:
                 flg = True
if flg:
    print("YES")
else:
    print("NO")
Buggy code:
  i = set(map(str, input().split()))
  if ( '1' in i and '9' in i and '7' in i and '4' in i ):
      print ('YES')
  else:
      print ('NO')

Fixed code:
i = set(map(str, input().split()))
if ( '1' in i and '9' in i and '7' in i and '4' in i ):
    print ('YES')
else:
    print ('NO')
Buggy code:
n = list(map(int, input().split()))

for i in range(len(n)):
  if n[i] == 1:
    n[i] = 1
  elif n[i] == 7:
    n[i] = 10
  elif n[i] == 9:
    n[i] = 100
  elif n[i] == 4:
    n[i] = 1000
    
if sum(n) == 1111:
  print("YES")
else:
  print("NO")
"""

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

for i in range(len(n)):
  if n[i] == 1:
    n[i] = 1
  elif n[i] == 7:
    n[i] = 10
  elif n[i] == 9:
    n[i] = 100
  elif n[i] == 4:
    n[i] = 1000
    
if sum(n) == 1111:
  print("YES")
else:
  print("NO")
Buggy code:
N=input().split()
if N.count('1')==1 and N.count('7')==1 and 
                N.count('9')==1 and N.count('4')==1:
                    print('YES')
else:
    print('NO')

Fixed code:
l = input().split()
if l.count("1") == 1 and l.count("9") == 1 and l.count("7") == 1 and l.count("4") == 1:
  print("YES")
else:
  print("NO")
Buggy code:
A = [int(_) for _ in input().split()]

res = sorted(set(A), key=A.index)
print(len(res))
ttt = all((x == 1or x == 9 or x== 7 or x == 4  for x in A))



if ttt and len(res)==4:
    print("YES")
else:
    print("NO")

Fixed code:
A = [int(_) for _ in input().split()]

res = sorted(set(A), key=A.index)
ttt = all((x == 1or x == 9 or x== 7 or x == 4  for x in A))

if ttt and len(res)==4:
    print("YES")
else:
    print("NO")
Buggy code:

ll = [1, 9, 7, 4]

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

if ( a in ll ):
  ll.remove(a)
  if ( b in ll ):
    ll.remove(b)
    if ( c in ll ):
      ll.remove(bc)
      if ( d in ll ):
        print("YES")
else:
  print("NO")




Fixed code:

ll = [1, 9, 7, 4]

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

if ( a in ll ):
  ll.remove(a)
  if ( b in ll ):
    ll.remove(b)
    if ( c in ll ):
      ll.remove(c)
      if ( d in ll ):
        print("YES")
      else:
        print("NO")
    else:
      print("NO")
  else:
    print("NO")
else:
  print("NO")
Buggy code:
# 2019/01/13
# KEYENCE Programming Contest 2019 - A

# Input
n = [0, 0, 0, 0]
val = [1, 9, 7, 4]
valflg = [0, 0, 0, 0]

n[0], n[1], n[2], n[3] = map(int,input().split())

for idx in range(4):
    for idx2 in range(4):
        if n[idx] == val[idx2]:
            valflg[idx2] = 1

if valflg[0] + valflg[1] + valflg[2] + valflg[3] == 4:
    ans = "Yes"
else:
    ans = "No"
    
# Output
print(ans)


Fixed code:
# 2019/01/13
# KEYENCE Programming Contest 2019 - A
 
# Input
n = [0, 0, 0, 0]
val = [1, 9, 7, 4]
valflg = [0, 0, 0, 0]
 
n[0], n[1], n[2], n[3] = map(int,input().split())
 
for idx in range(4):
    for idx2 in range(4):
        if n[idx] == val[idx2]:
            valflg[idx2] = 1
 
if valflg[0] + valflg[1] + valflg[2] + valflg[3] == 4:
    ans = "YES"
else:
    ans = "NO"
    
# Output
print(ans)
Buggy code:
ans = [1,9,7,4]
N = list(map(int,input().split()))

flag = True
for n in N:
    if n not in ans:
        print('NO')
        flag =False
    else:
        ans.remove(n)
if flag:
    print('YES')

Fixed code:
ans = [1,9,7,4]
N = list(map(int,input().split()))

flag = True

for a in ans:
    if a in N:
        N.remove(a)
    else:
        flag = False

if flag:
    print('YES')
else:
    print('NO')
Buggy code:
i = input()
set_1 = set(i)
if set_1 == {"1", "9", "7", "4"}:
    print("YES")
else:
    print("NO")

Fixed code:
i = input().split(" ")
set_1 = set(i)
if set_1 == {"1", "9", "7", "4"}:
    print("YES")
else:
    print("NO")
Buggy code:
print('YES' if input().split().sort()==['1','4','7','9'] else 'NO')

Fixed code:
n = input().split()
n.sort()
if n == ["1","4","7","9"]:
    print("YES")
else:
    print("NO")
Buggy code:
def main():
    N = list(map(int, input().split()))
    if 1 in N:
        del N[N.index(1)]
    if 9 in N:
        del N[N.index(9)]
    if 7 in N:
        del N[N.index(7)]
    if 4 in N:
        del N[N.index(4)]
    if N == []:
        return "YES"
    else:
        return "N0"

if __name__ == "__main__":
    print(main())


Fixed code:
def main():
    N = list(map(int, input().split()))
    if 1 in N:
        del N[N.index(1)]
    if 9 in N:
        del N[N.index(9)]
    if 7 in N:
        del N[N.index(7)]
    if 4 in N:
        del N[N.index(4)]
    if N == []:
        return "YES"
    else:
        return "NO"

if __name__ == "__main__":
    print(main())
Buggy code:
n = list(map(int, input().split()))
x1 = 0
x9 = 0
x7 = 0
x4 = 0

for i in range(4):
  if n[i] == 1:
    x1 += 1
  if n[i] == 9:
    x9 += 1
  if n[i] == 7:
    x7 += 1
  if n[i] == 4:
    x4 += 1

if max(x1, x9, x7, x4) == 1:
  print("YES")
else:
  print("NO")

Fixed code:
n = list(map(int, input().split()))
x1 = 0
x9 = 0
x7 = 0
x4 = 0

for i in range(4):
  if n[i] == 1:
    x1 += 1
  if n[i] == 9:
    x9 += 1
  if n[i] == 7:
    x7 += 1
  if n[i] == 4:
    x4 += 1

if min(x1, x9, x7, x4) == 1:
  print("YES")
else:
  print("NO")
Buggy code:
a=list(input().split())
a.sort()
b=[1,7,9,4]
if a==b:
  print('YES')
else: print('NO')

Fixed code:
a = input().split()
a.sort()
b = ['1', '4', '7', '9']
if a == b:
  print("YES")
else:
  print("NO")
Buggy code:
N_list = list(map(int, input().split()))
flag = False
if '1' in N_list:
    if '9' in N_list:
        if '7' in N_list:
            if '4' in N_list:
                flag=True
if flag:
    print('YES')
else:
    print('NO')

Fixed code:
N_list = list(map(int, input().split()))
flag = False
if 1 in N_list:
    if 9 in N_list:
        if 7 in N_list:
            if 4 in N_list:
                flag=True
if flag:
    print('YES')
else:
    print('NO')
Buggy code:
if {input().split()} == {"1", "9", "7", "4"}:
  print("YES")
else:
  print("NO")

Fixed code:
N=input().split()
if set(N)=={'1','9','7','4'}:
    print('YES')
else:
    print('NO')
Buggy code:
n= sort(list(int,input().split()))
if n == [1,7,9,4]:
  print("YES")
else:
  print("NO")

Fixed code:
n=list(map(int,input().split()))
n.sort()
ans=[1,4,7,9]
if n==ans:
    print('YES')
else:
    print('NO')
Buggy code:
N=list(map(int,input().split()))
N.sort()

if N==[1,4,7,9]:
    print('YES')
else:
    print('No')

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

if(N == [1, 4, 7, 9]):
    print('YES')
else:
    print('NO')
Buggy code:
s = set(list(map(int, input().split(' '))))
if s == set([1,9,7,4]):
    print(YES)
else:
    print(NO)

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

if set(N)==set([1,9,7,4]):
    print('YES')
else:
    print('NO')
Buggy code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    if 1 not in N:
        return "No"
    if 9 not in N:
        return "No"
    if 7 not in N:
        return "No"
    if 4 not in N:
        return "No"
    return 'Yes'


def main():
    N = read_int_n()
    print(slv(N))


if __name__ == '__main__':
    main()


Fixed code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    if 1 not in N:
        return "NO"
    if 9 not in N:
        return "NO"
    if 7 not in N:
        return "NO"
    if 4 not in N:
        return "NO"
    return 'YES'


def main():
    N = read_int_n()
    print(slv(N))


if __name__ == '__main__':
    main()
Buggy code:
n = input().split(" ")

print("YES" if set(n) == {1, 7, 9, 4} else "NO")

Fixed code:
n=set(input().split())
print("YES" if n=={"1","9","7","4"} else "NO")
Buggy code:
list = input().split() #

if 1 in list and 9 in list and 7 in list and 4 in list:
    print("YES")
else:
    print("NO")

Fixed code:
A = list(input().split())
if "1" in A and "9" in A and "7" in A and "4" in A:
    print("YES")
else:
    print("NO")
Buggy code:

N=list(input().split())
if N.count('1')==1 and N.count('7')==1 and 
                N.count('9')==1 and N.count('4')==1:
                    print('YES')
else:
    print('NO')

Fixed code:
a = list(input().split())
if a.count("1")==1 and a.count("7")==1 and a.count("9")==1 and a.count("4")==1:
    print("YES")
else:
    print("NO")
Buggy code:
S=input().split()
if "1" and "7" and "9" and "4" in S:
  print("YES")
else:
  print('NO')


Fixed code:
s = input().split()
if '1' in s and '9' in s and '7' in s and '4' in s:
  print('YES')
else:
  print('NO')
Buggy code:
a=list(map(int,input().split()))
a,sort()
if a==[1,4,7,9] :
  print("YES")
else:
  print("NO")

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

if A == [1,4,7,9]:
  print("YES")
else:
  print("NO")