Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
S=list(input())
q=int(input())
direction=1
T=['1' for j in range(10**5)]
for i in range(q):
  query=list(input().split())
  if query[0]=='1':
    direction=-1*direction
  else:
    value=-1+2*(int(query[1])-1)
    e=value*direction
    if e==-1:
      S.insert(0,query[2])
    else:
      S.append(query[2])
if direction==-1:
  for j in range(len(S)):
    T[j]=S[len(S)-j-1]
  S=T[:len(S)]
moji=''.join(S)
print(moji)

Fixed submission:
t=list(input())
q=int(input())
s=[]

for i in range(q):
  query=list(input().split())
  if query[0]=='1':
    s,t=t,s
  else:
    if query[1]=='1':
      s.extend(query[2])
    else:
      t.extend(query[2])
if s==[]:
  s=t
else:
  s.reverse()
  s.extend(t)

moji=''.join(s)
print(moji)

Buggy python submission (verdict: Runtime Error):
S=list(input())
q=int(input())
T=['1' for j in range(10**5)]
for i in range(q):
  query=list(input().split())
  if query[0]=='1':
    p=len(S)
    for k in range(p):
      T[k]=S[p-1-k]
    S=T[:p]  
  else:
    if query[1]=='1':
      S.insert(0,query[2])
    else:
      S.append(query[2])
moji=''.join(S)
print(moji)

Fixed submission:
t=list(input())
q=int(input())
s=[]

for i in range(q):
  query=list(input().split())
  if query[0]=='1':
    s,t=t,s
  else:
    if query[1]=='1':
      s.extend(query[2])
    else:
      t.extend(query[2])
if s==[]:
  s=t
else:
  s.reverse()
  s.extend(t)

moji=''.join(s)
print(moji)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
num=0
array=[99999 for i in range(n)]
for _ in range(m):
  s,c = map(int,input().split())
  if array[s-1]==99999 or array[s-1]==c:
    array[s-1]=c
  else:
    array=[-1 for i in range(n)]
    break

if not n==1:
  for i in range(n):
    if not i==0:
      if array[i]==99999:
        array[i]=0
    else:
      array[i]=1
  if array[0]==0 or array[0]==-1:
    num=-1
  else:
    num=int(''.join(list(map(str,array))))
else:
  if array[0]==99999:
    num=-1
  else:
    num=array[0]
print(num)
    
    


Fixed submission:
n,m=map(int,input().split())
num=0
array=[99999 for i in range(n)]
for _ in range(m):
  s,c = map(int,input().split())
  if array[s-1]==99999 or array[s-1]==c:
    array[s-1]=c
  else:
    array=[-1 for i in range(n)]
    break

if not n==1:
  for i in range(n):
    if not i==0:
      if array[i]==99999:
        array[i]=0
    else:
      if array[i]==99999:
        array[i]=1
  if array[0]==-1 or array[0]==0:
    num=-1
  else:
    num=int(''.join(list(map(str,array))))
else:
  if array[0]==99999:
    num=0
  else:
    num=array[0]
print(num)
Buggy python submission (verdict: Runtime Error):
n,m,l = map(int, input().split())
INF = 1001001001
dist = [[INF for i in range(n)] for i in range(n)]
#make graph
for i in range(n):
  dist[i][i] = 0
for i in range(m):
  a, b, c = map(int, input().split())
  dist[a-1][b-1] = dist[b-1][a-1] = c
#warshall-froyd
for k in range(n):
  for i in range(n):
    for j in range(n):
      dist[i][j] = min(dist[i][j], dist[i][k]+dist[k][j])
dist2 =  [[INF for i in range(n)] for i in range(n)]
for i in range(n):
  for j in range(n):
    if dist[i][j] <=l:
      dist2[i][j] = 1
#warshall-froyd
for k in range(n):
  for i in range(n):
    for j in range(n):
      dist2[i][j] = min(dist2[i][j], dist2[i][k]+dist2[k][j])
q = int(input())
for i in range(q):
  s,t = map(int, input().split())
  if dist2[s-1][t-1] == INF:
    print(-1)
  else:
    print(dist2[s-1][t-1]-1)

Fixed submission:
A, B = map(int, input().split())
s = A-2*B
if s>0:
  print(s)
else:
  print(0)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count = 0
List = list(map(int, input().split()))
for i in range(N-2):
  for j in range(N-i-2):
    for k in range(N-i-j-2):
      a = List[i]
      b = List[i+j+1]
      c = List[i+j+k+2]
      if a+b>c and a+c>b and b+c>a:
        count += 1
print(count)

Fixed submission:
import bisect
N = int(input())
count = 0
List = sorted(list(map(int, input().split())))
for i in range(N-2):
  for j in range(N-i-2):
    a = List[i]
    b = List[i+j+1]
    index = bisect.bisect_left(List, a+b)
    count += index-i-j-2
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count = 0
List = list(map(int, input().split()))
for i in range(N-2):
  for j in range(N-i-2):
    for k in range(N-i-j-2):
      a = List[i]
      b = List[i+j+1]
      c = List[i+j+k+2]
      if a+b>c and a+c>b and b+c>a:
        count += 1
print(count)

Fixed submission:
import bisect
N = int(input())
count = 0
List = sorted(list(map(int, input().split())))
for i in range(N-2):
  for j in range(N-i-2):
    a = List[i]
    b = List[i+j+1]
    index = bisect.bisect_left(List, a+b)
    count += index-i-j-2
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count = 0
List = list(map(int, input().split()))
for i in range(N):
  for j in range(N):
    for k in range(N):
      a = List[i]
      b = List[j]
      c = List[k]
      if i != j and i != k and k != j:
        if a+b>c and a+c>b and b+c>a:
          count += 1
print(int(count/6))

Fixed submission:
import bisect
N = int(input())
count = 0
List = sorted(list(map(int, input().split())))
for i in range(N-2):
  for j in range(N-i-2):
    a = List[i]
    b = List[i+j+1]
    index = bisect.bisect_left(List, a+b)
    count += index-i-j-2
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n,m,l = map(int, input().split())
INF = 1001001001
dist = [[INF for i in range(n)] for i in range(n)]
#make graph
for i in range(n):
  dist[i][i] = 0
for i in range(m):
  a, b, c = map(int, input().split())
  dist[a-1][b-1] = dist[b-1][a-1] = c
#warshall-froyd
for k in range(n):
  for i in range(n):
    for j in range(n):
      dist[i][j] = min(dist[i][j], dist[i][k]+dist[k][j])
dist2 =  [[INF for i in range(n)] for i in range(n)]
for i in range(n):
  for j in range(n):
    if dist[i][j] <=l:
      dist2[i][j] = 1
#warshall-froyd
for k in range(n):
  for i in range(n):
    for j in range(n):
      dist2[i][j] = min(dist2[i][j], dist2[i][k]+dist2[k][j])
q = int(input())
for i in range(q):
  s,t = map(int, input().split())
  if dist2[s-1][t-1] == INF:
    print(-1)
  else:
    print(dist2[s-1][t-1]-1)

Fixed submission:
n,m,l = map(int, input().split())
INF = 1001001001
dist = [[INF for i in range(n)] for i in range(n)]
#make graph
for i in range(n):
  dist[i][i] = 0
for i in range(m):
  a, b, c = map(int, input().split())
  dist[a-1][b-1] = dist[b-1][a-1] = c
#warshall-froyd
for k in range(n):
  for i in range(n):
    for j in range(n):
      dist[i][j] = min(dist[i][j], dist[i][k]+dist[k][j])
dist2 =  [[INF for i in range(n)] for i in range(n)]
for i in range(n):
  for j in range(n):
    if dist[i][j] <=l:
      dist2[i][j] = 1
#warshall-froyd
for k in range(n):
  for i in range(n):
    for j in range(n):
      dist2[i][j] = min(dist2[i][j], dist2[i][k]+dist2[k][j])
q = int(input())
for i in range(q):
  s,t = map(int, input().split())
  if dist2[s-1][t-1] == INF:
    print(-1)
  else:
    print(dist2[s-1][t-1]-1)
Buggy python submission (verdict: Runtime Error):
list1=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a = int(input())
print(list1[a+1])

Fixed submission:
list1=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a = int(input())
print(list1[a-1])
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
print(int(h*w/2) + w*h%2))

Fixed submission:
h,w=map(int,input().split())
if h!=1 and w!= 1:
  print(int(h*w/2) + w*h%2)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
a = int(input())
list1 = []
for i in range(9):
  for j in range(9):
    list1.append((i+1)*(j+1))
b = len(list1)
flag = 0
for k in range(b):
  if a == list1[k]:
    flag = 1
    break;
if flag == 1:
  print("Yes")
else:
  print("No")

Fixed submission:
a,b = map(int,input().split())
if a>=10 or b>=10:
  print(-1)
else:
  print(a*b)

Buggy python submission (verdict: Runtime Error):
a,b = int(input().split())
if a>=10 or b>=10:
  print(-1)
else:
  print(a*b)

Fixed submission:
a,b = map(int,input().split())
if a>=10 or b>=10:
  print(-1)
else:
  print(a*b)
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a <= 5:
  print('0')
else:
  if a <= 12:
    print(int(b/2))
  else:
    print(b)

Fixed submission:
a,b,c = map(int,input().split())
for i in range(10):
  c = a*c-b
  print(c)
Buggy python submission (verdict: Runtime Error):
n,q = map(int,input().split())
s = input()
for i in range(q):
  l,r = map(int,input().split())
  j = l-1
  AC = 0
  while j < r-1:
    if s[j] == "A" and s[j+1] == "C":
      AC += 1
      j += 1
    j += 1
  print(AC)

Fixed submission:
b = input()
if b == 'A':
  print('T')
if b == 'T':
  print('A')
if b == 'C':
  print('G')
if b == 'G':
  print('C')
Buggy python submission (verdict: Runtime Error):
b = input()
len = len(b)
ACGT = 0
MAX = 0
for i in range(b):
  if b[i]=="A" or b[i]=="C" or b[i]=="G" or b[i]=="T":
    ACGT += 1
  else:
    MAX = ACGT
    ACGT = 0
print(MAX)

Fixed submission:
b = input()
len = len(b)
ACGT = 0
MAX = 0
flag = 0
for i in range(len):
  if b[i]=="A" or b[i]=="C" or b[i]=="G" or b[i]=="T":
    ACGT += 1
  else:
    if ACGT > MAX:
      MAX = ACGT
    ACGT = 0
if ACGT > MAX:
  MAX = ACGT
print(MAX)

Buggy python submission (verdict: Runtime Error):
b = input()
ACGT = 0
for i in range(len(b)):
  if b[i]=="A" or b[i]=="C" or b[i]=="G" or b[i]=="T":
    ACGT += 1
  else:
    MAX = ACGT
    ACGT = 0
print(MAX)

Fixed submission:
b = input()
len = len(b)
ACGT = 0
MAX = 0
flag = 0
for i in range(len):
  if b[i]=="A" or b[i]=="C" or b[i]=="G" or b[i]=="T":
    ACGT += 1
  else:
    if ACGT > MAX:
      MAX = ACGT
    ACGT = 0
if ACGT > MAX:
  MAX = ACGT
print(MAX)
Buggy python submission (verdict: Runtime Error):
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>=2 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i-1)
    S.pop(i-1)
    i-=1
  else:
    i+=1

print(L-len(S))

Fixed submission:
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>1 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i-1)
    S.pop(i-1)
    i-=1
  else:
    i+=1
  if i==0:
    i+=1
print(L-len(S))

Buggy python submission (verdict: Runtime Error):
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>1 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i)
    S.pop(i-1)
    i-=1
  else:
    i+=1

print(L-len(S))

Fixed submission:
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>1 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i-1)
    S.pop(i-1)
    i-=1
  else:
    i+=1
  if i==0:
    i+=1
print(L-len(S))

Buggy python submission (verdict: Runtime Error):
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>0 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i)
    S.pop(i-1)
    i-=1
  else:
    i+=1

print(L-len(S))

Fixed submission:
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>1 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i-1)
    S.pop(i-1)
    i-=1
  else:
    i+=1
  if i==0:
    i+=1
print(L-len(S))

Buggy python submission (verdict: Runtime Error):
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>0 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i-1)
    S.pop(i-1)
    i=i-1
  else:
    i+=1

print(L-len(S))

Fixed submission:
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>1 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i-1)
    S.pop(i-1)
    i-=1
  else:
    i+=1
  if i==0:
    i+=1
print(L-len(S))
Buggy python submission (verdict: Time Limit Exceeded):
a = input()
list = input().split()
b = len(list)
for j in range(b):
	list[j] = int(list[j])
for k in range(b-1):
	l = k + 1
	while l < b:
		if list[k] > list[l]:
			temp = list[k]
			list[k] = list[l]
			list[l] = temp
		l += 1
gcd = int(list[0])
for i in range(b):
	m = list[i] 
	n = gcd
	while n != 0:
		m,n = n,m%n
	if(m<gcd):
		gcd = m
print(gcd)

Fixed submission:
a = input()
list = list(map(int,input().split()))
b = len(list)
gcd = int(list[0])
for i in range(b):
	m = list[i] 
	n = gcd
	while n != 0:
		m,n = n,m%n
	if(m<gcd):
		gcd = m
print(gcd)

Buggy python submission (verdict: Time Limit Exceeded):
n = input()
list = input().split()
for j in range(len(list)):
	list[j] = int(list[j])
for k in range(len(list)-1):
	l = k + 1
	while l < len(list):
		if list[k] > list[l]:
			temp = list[k]
			list[k] = list[l]
			list[l] = temp
		l += 1
gcd = list[0]
for i in range(len(list)):
	m = list[i] 
	n = gcd
	while n != 0:
		m,n = n,m%n
	if(m<gcd):
		gcd = m
print(gcd)
  

Fixed submission:
a = input()
list = list(map(int,input().split()))
b = len(list)
gcd = int(list[0])
for i in range(b):
	m = list[i] 
	n = gcd
	while n != 0:
		m,n = n,m%n
	if(m<gcd):
		gcd = m
print(gcd)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
i = 0
while i < n:
  a[i] = int(a[i])
  i = i + 1 

i = 0
while i < n:
  j = i + 1
  while j < n:
    if a[i] < a[j]:
      temp = a[i]
      a[i] = a[j]
      a[j] = temp
    j = j + 1
  i = i + 1

sum = sum(a)
print(a[0])
if(sum-a[0] > a[0]):
  print("Yes")
else:
  print("No")

Fixed submission:
a = input().split()
b = float(int(a[0]) / int(a[1]))
print(b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
i = 0
while i < 4:
  a[i] = int(a[i])
  i = i + 1 

i = 0
while i < 4:
  j = i + 1
  while j < 4:
    if a[i] < a[j]:
      temp = a[i]
      a[i] = a[j]
      a[j] = a[i]
    j = j + 1
  i = i + 1

sum = sum(a)
if(sum-a[0] > a[0]):
  print("Yes")
else:
  print("No")

Fixed submission:
n = int(input())
a = input().split()
i = 0
while i < n:
  a[i] = int(a[i])
  i = i + 1 
 
i = 0
while i < n:
  j = i + 1
  while j < n:
    if a[i] < a[j]:
      temp = a[i]
      a[i] = a[j]
      a[j] = temp
    j = j + 1
  i = i + 1
 
sums = sum(a)

if(sums - a[0] > a[0]):
  print("Yes")
else:
  print("No")
sum = sum(a)
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = int(input())
w = int(input())
a = []
b = []
i = 1
while i <= n:
    a.append(int(input))
    b.append(int(input))

i = 0
flag = 0

while i < n:
    if a[i] >= h and b[i] >=w:
        flag = flag + 1
    i = i + 1
print(flag)

Fixed submission:
n,h,w = input().split()
a = [0] * int(n)
b = [0] * int(n)
i = 0
while i < int(n):
    a[i],b[i] = input().split()
    i = i + 1

i = 0
flag = 0

while i < int(n):
    if int(a[i]) >= int(h) and int(b[i]) >= int(w):
        flag = flag + 1
    i = i + 1
print(flag)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
list = []
for i in range(n):
  list.append(int(input()))
list.sort()
min = list[n-1]
for j in range(n-k+1):
  if list[j+k-1]-list[j] < min:
    min = list[j+k-1]-list[j]
print(min)

Fixed submission:
D = int(input())
a = abs(D-25)
C = list('Christmas')
for i in range(a):
  C.append(' ')
  C.append('E')
  C.append('v')
  C.append('e')
  
print(''.join(C))
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
list = []
for i in range(n):
  list.append(int(input()))
list.sort()
min = 10^9
for j in range(n-k+1):
  if list[j+k-1]-list[j] < min:
    min = list[j+k]-list[j]
print(min)


Fixed submission:
n,k = map(int,input().split())
list = []
for i in range(n):
  list.append(int(input()))
list.sort()
min = list[n-1]
for j in range(n-k+1):
  if list[j+k-1]-list[j] < min:
    min = list[j+k-1]-list[j]
print(min)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
list = []
for i in range(n):
  list.append(int(input()))
list.sort()
min = 10^9
for j in range(n-k+1):
  if list[j+k-1]-list[j] < min:
    min = list[j+k]-list[j]
print(min)


Fixed submission:
n,k = map(int,input().split())
list = []
for i in range(n):
  list.append(int(input()))
list.sort()
min = list[n-1]
for j in range(n-k+1):
  if list[j+k-1]-list[j] < min:
    min = list[j+k-1]-list[j]
print(min)
Buggy python submission (verdict: Runtime Error):
if int(input()) == 2:
  print(int(input())+int(int(input())
else:
  print('Hello World')
  

Fixed submission:
if int(input()) == 2:
  print(int(input())+int(input()))
else:
  print('Hello World')
Buggy python submission (verdict: Runtime Error):
n=input()

if(n[0] == 1):
  n[0] = 9
else:
  n[0] = 1
if(n[1] == 1):
  n[1] = 9
else:
  n[1] = 1
if(n[2] == 1):
  n[2] = 9
else:
  n[2] = 1

Fixed submission:
n = int(input())
if n == 111:
  print(999)
if n == 119:
  print(991)
if n == 191:
  print(919)
if n == 199:
  print(911)
if n == 911:
  print(199)
if n == 919:
  print(191)
if n == 991:
  print(119)
if n == 999:
  print(111)

Buggy python submission (verdict: Runtime Error):
n=input()
for i in range(len(n))
if(n[0] == 1):
  n[0] = 9
else:
  n[0] = 1
if(n[1] == 1):
  n[1] = 9
else:
  n[1] = 1
if(n[2] == 1):
  n[2] = 9
else:
  n[2] = 1


Fixed submission:
n = int(input())
if n == 111:
  print(999)
if n == 119:
  print(991)
if n == 191:
  print(919)
if n == 199:
  print(911)
if n == 911:
  print(199)
if n == 919:
  print(191)
if n == 991:
  print(119)
if n == 999:
  print(111)
Buggy python submission (verdict: Runtime Error):
r = int(input())
sum = 0
for i in range(n):
  sum += i+1
print(sum)

Fixed submission:
n = int(input())
sum = 0
for i in range(n):
  sum += i+1
print(sum)
Buggy python submission (verdict: Runtime Error):
list1 = list(map(int,input().split()))
list1.sort()
if list1[0] == 5 and list[1] ==7 and list[2]==7:
  print("YES")
else:
  print("NO")

Fixed submission:
list1 = list(map(int,input().split()))
list1.sort()
if list1[0]==5 and list1[1]==5 and list1[2]==7:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
N=input()
A=input()
print(N*N-A)

Fixed submission:
N=int(input())
A=int(input())
print(N*N-A)
Buggy python submission (verdict: Runtime Error):
s=int(input().replace(' ',''))
print(['YES','NO'][s%4])

Fixed submission:
s=input().split()
s=int(''.join(s))
if s%4==0:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
s=input()
print(['YES','NO'][int(s.replace(' ',''))%4])

Fixed submission:
s=input().split()
s=int(''.join(s))
if s%4==0:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
print(['YES','NO'][int(input().replace(' ',''))%4])

Fixed submission:
s=input().split()
s=int(''.join(s))
if s%4==0:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
print(['YES','NO'][int(input().replace(' ',''))%4])

Fixed submission:
s=input().split()
s=int(''.join(s))
if s%4==0:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d=[]
d.append(a)
d.append(b)
d.append(c)
d.sort()
if a[0]+a[1]==a[2]:
  print('YES')
else:
  print('NO')

Fixed submission:
a,b,c=sorted(map(int,input().split()))
if a+b==c:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a=list(map(int,input().split())).sort()
if a[0]+a[1]==a[2]:
  print('YES')
else:
  print('NO')

Fixed submission:
a,b,c=sorted(map(int,input().split()))
if a+b==c:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a=list(map(int,input())).sort()
if a[0]+a[1]==a[2]:
  print('YES')
else:
  print('NO')

Fixed submission:
a,b,c=sorted(map(int,input().split()))
if a+b==c:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n,l = map(int, input().split())
s = sorted([input() for i in range(n)])
print(*s, sep="")

Fixed submission:
s=input()
if s.count('5')==2 and s.count('7')==1:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
s=[input() for i in range(n)]
s=sorted(s)
print(''.join(s))


Fixed submission:
s=input()
if s.count('5')==2 and s.count('7')==1:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
s=input()
cnt=int(s[0])
l=[]
for i in range(cnt):
  l.append(input())
l=sorted(l)
print(''.join(l))

Fixed submission:
s=input()
if s.count('5')==2 and s.count('7')==1:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
cnt=int(input()[0])
l=[]
for i in range(cnt):
  l.append(input())
l=sorted(l)
print(''.join(l))

Fixed submission:
s=input()
if s.count('5')==2 and s.count('7')==1:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
enemy=int(input())
skill=int(input())
for i in range(skill):
    damage=int(input())
    enemy=enemy-damage
if(enemy<=0):
    print("Yes")
else:
    print("No")


Fixed submission:
enemy,skill=map(int,input().split())
damage=map(int,input().split())
if(enemy-sum(damage)<=0):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
enemy,skill=map(int,input().split())
for i in range(skill):
    damage=int(input())
    enemy=enemy-damage
if(enemy<=0):
    print("Yes")
else:
    print("No")


Fixed submission:
enemy,skill=map(int,input().split())
damage=map(int,input().split())
if(enemy-sum(damage)<=0):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(6-a-b)

Fixed submission:
a=int(input())
b=int(input())
print(6-a-b)
Buggy python submission (verdict: Runtime Error):
a=input()
b=["SUN","MON","THU","WED","THU","FRI","SAT"]
print(7-b.index(a))

Fixed submission:
a=input()
if a=="SUN":
    print(7)
elif a=="MON":
    print(6)
elif a=="TUE":
    print(5)
elif a=="WED":
    print(4)
elif a=="THU":
    print(3)
elif a=="FRI":
    print(2)
elif a=="SAT":
    print(1)
Buggy python submission (verdict: Runtime Error):
a=input()
b=["SUN","MON","THU","WED","THU","FRI","SAT"]
print(7-b.index(a))

Fixed submission:
a=int(input())
d=0
for num in range(a+1):
    c=num%2
    if c==1:
        d+=1
print(d/a)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())

c=a+b
if a-b>c:
    c=a-b
if a*b>c:
    c=a*b
print(c)

Fixed submission:
a,b=map(int,input().split())
c=a+b
if a-b>c:
    c=a-b
if a*b>c:
    c=a*b
print(c)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())

c=a+b
if a-b>c:
    c=a-b
if a*b>c:
    c=a*b
print(c)

Fixed submission:
a,b=map(int,input().split())
c=a+b
if a-b>c:
    c=a-b
if a*b>c:
    c=a*b
print(c)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print (a*b-(b*c+a*d-c*d))

Fixed submission:
a,b=map(int,input().split())
c,d=map(int,input().split())
print ((a-c)*(b-d))

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print (a*b-(b*c+a*d-c*d))

Fixed submission:
a,b=map(int,input().split())
c,d=map(int,input().split())
print ((a-c)*(b-d))

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
d=input()

aa=int(a)
bb=int(b)
cc=int(c)
dd=int(d)
print (aa*bb-(bb*cc+aa*dd-cc*dd))

Fixed submission:
a,b=map(int,input().split())
c,d=map(int,input().split())
print ((a-c)*(b-d))

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
d=input()

aa=int(a)
bb=int(b)
cc=int(c)
dd=int(d)
print (aa*bb-(bb*cc+aa*dd-cc*dd))

Fixed submission:
a,b=map(int,input().split())
c,d=map(int,input().split())
print ((a-c)*(b-d))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a*c<b:
    print(c)
else:
    print(b/a)

Fixed submission:
a,b,c = map(int,input().split())
if a*c<b:
    print(c)
else:
    print(b//a)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a*b<c:
    print(c)
else:
    print(b/a)

Fixed submission:
a,b,c = map(int,input().split())
if a*c<b:
    print(c)
else:
    print(b//a)

Buggy python submission (verdict: Runtime Error):
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int c=sc.nextInt();
        if(a*c<b){
            System.out.println(c);
        }else{
            System.out.println(b/a);
        }
    }   
}

Fixed submission:
a,b,c = map(int,input().split())
if a*c<b:
    print(c)
else:
    print(b//a)