Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math

def main():
    n = int(input())

    area = (n ** 2) * math.pi
    measure = (n * 2) *math.pi

    print("{0:.6f} {1:.6f}".format(area,measure))

if __name__ == "__main__":
    main()

Fixed submission:
import math

def main():
    n = float(input())

    area = (n * n) * math.pi
    measure = (n * 2) *math.pi

    print("{0:.6f} {1:.6f}".format(area,measure))

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import math

def main():
    n = int(input())

    area = (n ** 2) * math.pi
    measure = (n * 2) *math.pi

    print("{0:.6f} {1:.6f}".format(area,measure))

if __name__ == "__main__":
    main()

Fixed submission:
import math

def main():
    n = float(input())

    area = (n * n) * math.pi
    measure = (n * 2) *math.pi

    print("{0:.6f} {1:.6f}".format(area,measure))

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import math

def main():
    n = int(input())

    area = (n * n) * math.pi
    measure = (n * 2) *math.pi

    print("{0:.6f} {1:.6f}".format(area,measure))

if __name__ == "__main__":
    main()

Fixed submission:
import math

def main():
    n = float(input())

    area = (n * n) * math.pi
    measure = (n * 2) *math.pi

    print("{0:.6f} {1:.6f}".format(area,measure))

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
for a in range(1, 10):
    for b in range(1, 10):
        print("{}x{}={}".format(a, b, a*b)})

Fixed submission:
for a in range(1, 10):
    for b in range(1, 10):
        print("{}x{}={}".format(a, b, a*b))
Buggy python submission (verdict: Runtime Error):
a = input("input a: ")
a = int(a)
b = input("input b: ")
b = int(b)
print( a, b )
area = a*b
line = 2*a + 2*b
print( area, line )

Fixed submission:
a, b = map(int, input().split())
print ( a*b, 2*a+2*b )

Buggy python submission (verdict: Runtime Error):
a = input("input a: ")
a = int (a)
b = input("input b: ")
b = int (b)
area = a*b
line = 2*a + 2*b
print( area, line )

Fixed submission:
a, b = map(int, input().split())
print ( a*b, 2*a+2*b )

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
area = a*b
line = 2*a + 2*b
print( area, line )

Fixed submission:
a, b = map(int, input().split())
print ( a*b, 2*a+2*b )

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
area = a*b
line = 2*a + 2*b
print(area,line)

Fixed submission:
a, b = map(int, input().split())
print ( a*b, 2*a+2*b )

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
area = a*b
line = 2*(a+b)
ptint ( area, line )

Fixed submission:
a, b = map(int, input().split())
print ( a*b, 2*a+2*b )
Buggy python submission (verdict: Runtime Error):
lst=[]
for n in range(10):
    lst.append(int(input())
res=sorted(lst, reverse=True)
for i in range(3):
    print(res[i])

Fixed submission:
lst=[]
for n in range(10):
    lst.append(int(input()))
res=sorted(lst, reverse=True)
for i in range(3):
    print(res[i])
Buggy python submission (verdict: Runtime Error):
res=[]
s=True
while s:
    s=input()
    if s:
        a,b = [int(x) for x in s.split()]
        res.append(a+b)

import math
for n in res:
    print(int(math.log(n,10))+1)

Fixed submission:
res=[]

while 1:
    try:
        s=input()
        a,b = [int(x) for x in s.split()]
        res.append(a+b)
    except:
        for n in res:
            print(len(str(n)))
        break

Buggy python submission (verdict: Runtime Error):
res=[]
s=True
while s:
    s=input()
    if s:
        a,b = [int(x) for x in s.split()]
        res.append(a+b)

for n in res:
    print(len(str(n))+1)

Fixed submission:
res=[]

while 1:
    try:
        s=input()
        a,b = [int(x) for x in s.split()]
        res.append(a+b)
    except:
        for n in res:
            print(len(str(n)))
        break

Buggy python submission (verdict: Runtime Error):
res=[]
s=True
while s:
    s=input()
    if s:
        a,b = [int(x) for x in s.split()]
        res.append(a+b)

for n in res:
    print(len(str(n)))

Fixed submission:
res=[]

while 1:
    try:
        s=input()
        a,b = [int(x) for x in s.split()]
        res.append(a+b)
    except:
        for n in res:
            print(len(str(n)))
        break

Buggy python submission (verdict: Runtime Error):
res=[]

while True:
    s=input()
    if s:
        a,b = [int(x) for x in s.split()]
        res.append(a+b)
    else:
        break

for n in res:
    print(len(str(n)))

Fixed submission:
res=[]

while 1:
    try:
        s=input()
        a,b = [int(x) for x in s.split()]
        res.append(a+b)
    except:
        for n in res:
            print(len(str(n)))
        break
Buggy python submission (verdict: Runtime Error):
a,b=[int(x) for x in input().split()]

x = max(a,b)
y = min(a,b)

while x % y >0:
    res = x % y
    x = y
    y = res
print(res)

Fixed submission:
a,b=[int(x) for x in input().split()]

x = max(a,b)
y = min(a,b)
res = y

while x%y>0:
    res = x%y
    x = y
    y = res

print(res)

Buggy python submission (verdict: Runtime Error):
a,b=[int(x) for x in input().split()]

x = max(a,b)
y = min(a,b)

while x%y>0:
    res = x%y
    x = y
    y = res

print(res)

Fixed submission:
a,b=[int(x) for x in input().split()]

x = max(a,b)
y = min(a,b)
res = y

while x%y>0:
    res = x%y
    x = y
    y = res

print(res)

Buggy python submission (verdict: Runtime Error):
a,b=[int(x) for x in input().split()]

x = max(a,b)
y = min(a,b)

while x%y>0:
    x = y
    y = x%y

print(y)

Fixed submission:
a,b=[int(x) for x in input().split()]

x = max(a,b)
y = min(a,b)
res = y

while x%y>0:
    res = x%y
    x = y
    y = res

print(res)
Buggy python submission (verdict: Runtime Error):
a,b = [int(x) for x in input()]
if a<b:
    print("a < b")
elif a>b:
    print("a > b")
else:
    print("a == b")

Fixed submission:
a,b = [int(x) for x in input().split()]
if a<b:
    print("a < b")
elif a>b:
    print("a > b")
else:
    print("a == b")
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

for i in sys.stdin:
    a,b,c,d,e,f=list(map(float, i.split()))
    A=np.matrix([[a,b],[d,e]])
    inv_A = np.linalg.inv(A)
    P=np.matrix([[c],[f]])
    X=inv_A.dot(P)
    print("{0:.3f} {1:.3f}".format(X[0,0], X[1,0]))

Fixed submission:
import sys
#import numpy as np

for i in sys.stdin:
    a,b,c,d,e,f=list(map(float, i.split()))
    #A=np.matrix([[a,b],[d,e]])
    #inv_A = np.linalg.inv(A)
    #P=np.matrix([[c],[f]])
    #X=inv_A.dot(P)
    y = (f-(d*c)/a)/((a*e-d*b)/a)
    x = (c-b*y)/a
    print("{0:.3f} {1:.3f}".format(x,y))

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

for i in sys.stdin:
    a,b,c,d,e,f=list(map(float, i.split()))
    A=np.matrix([[a,b],[d,e]])
    inv_A = np.linalg.inv(A)
    P=np.matrix([[c],[f]])
    X=inv_A.dot(P)
    print("{0:.3f} {1:.3f}".format(X[0,0], X[1,0]))

Fixed submission:
import sys
#import numpy as np

for i in sys.stdin:
    a,b,c,d,e,f=list(map(float, i.split()))
    #A=np.matrix([[a,b],[d,e]])
    #inv_A = np.linalg.inv(A)
    #P=np.matrix([[c],[f]])
    #X=inv_A.dot(P)
    y = (f-(d*c)/a)/((a*e-d*b)/a)
    x = (c-b*y)/a
    print("{0:.3f} {1:.3f}".format(x,y))
Buggy python submission (verdict: Runtime Error):
for i in range(9):
  for j in range(9):
    print(i+1 + "x" + j+1 + "=" + i*j)

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
        print("{}x{}={}".format(i,j,i*j))
Buggy python submission (verdict: Runtime Error):
import sys
import math

for line in sys.stdin:
  a, b = [int(i) for i in line.split()]
  print(int(math.log10(a * b) + 1))

Fixed submission:
import sys
import math

for line in sys.stdin:
  try:
    a, b = [int(i) for i in line.split()]
    print(int(math.log10(a + b) + 1))
  except:
    break
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
  if x2 - x1 == 0:
    if x4 - x3 == 0:
      print("YES")
    else:
      print("NO")
  print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")

Fixed submission:
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) * 10**10 for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
  if x2 - x1 == 0.0:
    if x4 - x3 == 0.0:
      print("YES")
    else:
      print("NO")
  print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")

Fixed submission:
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) * 10**10 for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
  if x2 - x1 == 0.0:
    if x4 - x3 == 0.0:
      print("YES")
    else:
      print("NO")
  elif x4 - x3 == 0.0:
    print("NO") 
  print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")

Fixed submission:
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) * 10**10 for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")
Buggy python submission (verdict: Runtime Error):
for i in range(1, 10):
    for j in range(1, 10):
        print str(i) + 'x' + str(j) + '=' + str(i * j)


Fixed submission:
for i in range(1, 10):
    for j in range(1, 10):
        print str(i) + 'x' + str(j) + '=' + str(i * j)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
for i in range(1,10):
    for j in range(1,10):
        ans = i * j
        print(u"{0}×{1}={2}".format(i,j,ans))


Fixed submission:
# -*- coding: utf-8 -*-
for i in range(1,10):
    for j in range(1,10):
        ans = i * j
        print str(i)+"x"+str(j)+ "=" +str(i*j)
        #print(u"{0}×{1}={2}".format(i,j,ans))
Buggy python submission (verdict: Runtime Error):
list[]
for i range(0,10):
    n = int(raw_input())
    list.append(n)
list.sort(reverse=True)
for i in range(0,3):
    print list[i]

Fixed submission:
list=[]
for i in range(0,10):
    n = int(raw_input())
    list.append(n)
#print'---------------------'
list.sort(reverse=True)
for i in range(0,3):
    print list[i]
Buggy python submission (verdict: Runtime Error):
while True:
    try:
        a,b,c,d,e,f=map(int,raw_input().split())
        if a*d-b*c==0:
            print "not exist answer"
        else:
            x = (c*e-b*f) / (a*e-b*d)
            y = (a*f-c*d) / (a*e-b*d)
            print ('%.3f' % round(x,3), ('%.3f' % round(y,3))
    except:
        break

Fixed submission:
while True:
    try:
        a,b,c,d,e,f=map(int,raw_input().split())
        if a*d-b*c==0:
            print "not exist answer"
        else:
            x = (float((c*e-b*f)) / (a*e-b*d))+0
            y = (float((a*f-c*d)) / (a*e-b*d))+0
            print ('%.3f' % round(x,3)), ('%.3f' % round(y,3))
    except:
        break
Buggy python submission (verdict: Runtime Error):
#Branch on Condition - Sorting Three Numbers

num=list(map(int,input().split()))
bubble_sort(num)
print(num)

def bubble_sort(arr):
    change = True
    while change:
        change = False
        for i in range(len(arr) - 1):
            if arr[i] > arr[i + 1]:
                arr[i], arr[i + 1] = arr[i + 1], arr[i]
                change = True
    return arr


Fixed submission:
#Branch on Condition - Sorting Three Numbers

num=list(map(int,input().split()))
num.sort()
print(num[0],num[1],num[2])

Buggy python submission (verdict: Runtime Error):
#Branch on Condition - Sorting Three Numbers

num=list(map(int,input().split()))
bubble_sort(num)
print(num[0],num[1],num[2])

def bubble_sort(arr):
    change = True
    while change:
        change = False
        for i in range(len(arr) - 1):
            if arr[i] > arr[i + 1]:
                arr[i], arr[i + 1] = arr[i + 1], arr[i]
                change = True
    return arr


Fixed submission:
#Branch on Condition - Sorting Three Numbers

num=list(map(int,input().split()))
num.sort()
print(num[0],num[1],num[2])

Buggy python submission (verdict: Runtime Error):
#Branch on Condition - Sorting Three Numbers

num=list(map(int,input().split()))
bubble_sort(num)
print(num[0],num[1],num[2])

def bubble_sort(arr):
    change = True
    while change:
        change = False
        for i in range(len(arr) - 1):
            if arr[i] > arr[i + 1]:
                arr[i], arr[i + 1] = arr[i + 1], arr[i]
                change = True
    return arr


Fixed submission:
#Branch on Condition - Sorting Three Numbers

num=list(map(int,input().split()))
num.sort()
print(num[0],num[1],num[2])
Buggy python submission (verdict: Runtime Error):
### Repetitive Processing - Print Test Cases

i = 0
while True:
    x = int(input());
    i += 1
    if x == 0: break
    print("Case {}: {}".format(c, i))


Fixed submission:
### Repetitive Processing - Print Test Cases

i = 0
while True:
    x = int(input());
    i += 1
    if x == 0: break
    print("Case {}: {}".format(i, x))
Buggy python submission (verdict: Runtime Error):
import sys
for e in sys.stdin.readlines():
 print(len(str(sum(map(int,e.split()))))


Fixed submission:
import sys
for e in sys.stdin:print(len(str(sum(map(int,e.split())))))
Buggy python submission (verdict: Runtime Error):
import sys
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin):
 print(['NO','YES'][a*a+b*b==c*c])


Fixed submission:
import sys
input()
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin):
 print(['NO','YES'][a*a+b*b==c*c])

Buggy python submission (verdict: Runtime Error):
import sys
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin):
 print(['NO','YES'][a*a+b*b==c*c])


Fixed submission:
import sys
input()
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin):
 print(['NO','YES'][a*a+b*b==c*c])

Buggy python submission (verdict: Runtime Error):
import sys
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin.readlines()):
 print(['NO','YES'][a*a+b*b==c*c])


Fixed submission:
import sys
input()
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin):
 print(['NO','YES'][a*a+b*b==c*c])
Buggy python submission (verdict: Runtime Error):
import sys
for e in sys.stdin:
 a,b,c,d,e,f=map(int,e.split())
 y=(c*d-a*f)/(b*d-a*e)
 print(f'{(c-b*y)/a:.3f} {y:.3f}")


Fixed submission:
import sys
for e in sys.stdin:
 a,b,c,d,e,f=map(int,e.split())
 y=(c*d-a*f)/(b*d-a*e)
 print(f'{(c-b*y)/a:.3f} {y:.3f}')
Buggy python submission (verdict: Runtime Error):
import sys
a=[0]*51
for i in range(51):
 a[i]=sum([1 for a in x for b in x for c in x for d in x if a+b+c+d==e]))
for e in sys.stdin:
 print(a[int(e)])


Fixed submission:
import sys
a=[0]*51
for i in range(19):a[i]=a[36-i]=(i+3)*-~-~i*-~i//6-a[i-10]*4*(i>9)
for e in sys.stdin:print(a[int(e)])
Buggy python submission (verdict: Runtime Error):
for _ in[0]*int(input()):
 a,b,c,d,e,f=map(int,input().split())
 x=((a*a+b*b)*(d-f)+(c*c+d*d)*(f-b)+(e*e+f*f)*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
 y=((a*a+b*b)*(c-d)+(c*c+d*d)*(e-a)+(e*e+f*f)*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
 print(f"{x:.4} {y:.4} {(x*x+y*y)**.5:.4}")


Fixed submission:
for _ in[0]*int(input()):
 a,b,c,d,e,f=map(float,input().split())
 s,t,u=a*a+b*b,c*c+d*d,e*e+f*f
 x=(s*(d-f)+t*(f-b)+u*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
 y=(s*(c-e)+t*(e-a)+u*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
 print(f'{x:.3f} {y:.3f} {((x-a)**2+(y-b)**2)**.5:.3f}')

Buggy python submission (verdict: Runtime Error):
for _ in[0]*int(input()):
 a,b,c,d,e,f=map(float,input().split())
 x=((a*a+b*b)*(d-f)+(c*c+d*d)*(f-b)+(e*e+f*f)*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
 y=((a*a+b*b)*(c-e)+(c*c+d*d)*(e-a)+(e*e+f*f)*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
 print('.3f %.3f %.3f'%(x,y,((x-a)**2+(y-b)**2)**.5))


Fixed submission:
for _ in[0]*int(input()):
 a,b,c,d,e,f=map(float,input().split())
 s,t,u=a*a+b*b,c*c+d*d,e*e+f*f
 x=(s*(d-f)+t*(f-b)+u*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
 y=(s*(c-e)+t*(e-a)+u*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
 print(f'{x:.3f} {y:.3f} {((x-a)**2+(y-b)**2)**.5:.3f}')

Buggy python submission (verdict: Runtime Error):
import math
for _ in[0]*int(input()):
 a,b,c,d,e,f=map(float,input().split())
 s,t,u=a*a+b*b,c*c+d*d,e*e+f*f
 x=(s*(d-f)+t*(f-b)+u*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
 y=(s*(c-e)+t*(e-a)+u*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
 print('%.3f %.3f %.3f'%(x,y,math.hypot(x-a,y-b)))


Fixed submission:
for _ in[0]*int(input()):
 a,b,c,d,e,f=map(float,input().split())
 s,t,u=a*a+b*b,c*c+d*d,e*e+f*f
 x=(s*(d-f)+t*(f-b)+u*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
 y=(s*(c-e)+t*(e-a)+u*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
 print(f'{x:.3f} {y:.3f} {((x-a)**2+(y-b)**2)**.5:.3f}')

Buggy python submission (verdict: Runtime Error):
for _ in[0]*int(input()):
 a,b,c,d,e,f=map(float,input().split())
 s,t,u=a*a+b*b,c*c+d*d,e*e+f*f
 x=(s*(d-f)+t*(f-b)+u*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
 y=(s*(c-e)+t*(e-a)+u*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
 print(f'{x:.3f} {y:.3f} {((x-a)**2+(y-b)**2)**.5.3f}')


Fixed submission:
for _ in[0]*int(input()):
 a,b,c,d,e,f=map(float,input().split())
 s,t,u=a*a+b*b,c*c+d*d,e*e+f*f
 x=(s*(d-f)+t*(f-b)+u*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
 y=(s*(c-e)+t*(e-a)+u*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
 print(f'{x:.3f} {y:.3f} {((x-a)**2+(y-b)**2)**.5:.3f}')
Buggy python submission (verdict: Runtime Error):
a=[i+1 for i in range(int(input()))]
for _ in[0]*int(input()):
 s,t=map(int,input().split(','))
 a[s],a[t]=a[t],a[s]
for s in a:print(s+1)


Fixed submission:
a=list(range(int(input())+1))
for _ in[0]*int(input()):s,t=map(int,input().split(','));a[s],a[t]=a[t],a[s]
for s in a:s and print(s)

Buggy python submission (verdict: Runtime Error):
a=list(range(int(input())+1))
for _ in[0]*int(input()):s,t=map(int,input().split(','));a[s],a[t]=a[t],a[s]
for s in a:s*print(s)


Fixed submission:
a=list(range(int(input())+1))
for _ in[0]*int(input()):s,t=map(int,input().split(','));a[s],a[t]=a[t],a[s]
for s in a:s and print(s)
Buggy python submission (verdict: Runtime Error):
import sys
for e in sys.stdin:
 p,q,r,s,t,u,x,y=map(float,e.split())
 a=((x-p)*(u-q)-(y-q)*(t-p))/((r-p)*(u-q)-(s-q)*(t-p))
 b=(x-p-a*(r-p))/(t-p)
 print(['No','Yes'][0<a<1-b and 0<b<1-a])


Fixed submission:
import sys
def f(a,b,c,d):z=(c-a)*(y-d)-(d-b)*(x-c);return[-1*(z==0),1][z>0]
for e in sys.stdin:
 p,q,r,s,t,u,x,y=map(float,e.split())
 print(['NO','YES'][f(p,q,r,s)==f(r,s,t,u)==f(t,u,p,q)])

Buggy python submission (verdict: Runtime Error):
import sys
for e in sys.stdin:
 p,q,r,s,t,u,x,y=map(float,e.split())
 a=((x-p)*(u-q)-(y-q)*(t-p))/((r-p)*(u-q)-(s-q)*(t-p))
 b=(x-p-a*(r-p))/(t-p)
 print(['NO','YES'][0<a<1-b and 0<b<1-a])


Fixed submission:
import sys
def f(a,b,c,d):z=(c-a)*(y-d)-(d-b)*(x-c);return[-1*(z==0),1][z>0]
for e in sys.stdin:
 p,q,r,s,t,u,x,y=map(float,e.split())
 print(['NO','YES'][f(p,q,r,s)==f(r,s,t,u)==f(t,u,p,q)])
Buggy python submission (verdict: Runtime Error):
print(*reversed(map(int,input().split())))


Fixed submission:
print(*reversed(sorted(map(int,input().split()))))
Buggy python submission (verdict: Time Limit Exceeded):
while 1:
 n=int(input())
 if n:
  a=[int(input())for _ in[0]*n]
  print(max(sum(a[i:j+1])for i in range(n)for j in range(i,n)))


Fixed submission:
while 1:
 n=int(input())
 if n==0:break
 a=[int(input())for _ in[0]*n]
 for i in range(1,n):a[i]=max(a[i],a[i]+a[i-1])
 print(max(a))

Buggy python submission (verdict: Time Limit Exceeded):
while 1:
 n=int(input())
 if n:
  a=[int(input())for _ in[0]*n]
  print(max([sum(a[i:j+1])for i in range(n)for j in range(i,n)]))


Fixed submission:
while 1:
 n=int(input())
 if n==0:break
 a=[int(input())for _ in[0]*n]
 for i in range(1,n):a[i]=max(a[i],a[i]+a[i-1])
 print(max(a))

Buggy python submission (verdict: Time Limit Exceeded):
while 1:
 n=int(input())
 if n==0:break
 a=[int(input())for _ in[0]*n]
 print(max(sum(a[i:j+1])for i in range(n)for j in range(i,n)))


Fixed submission:
while 1:
 n=int(input())
 if n==0:break
 a=[int(input())for _ in[0]*n]
 for i in range(1,n):a[i]=max(a[i],a[i]+a[i-1])
 print(max(a))
Buggy python submission (verdict: Runtime Error):
import math,sys
for e in sys.stdin:print(int(float(input())**2/98+2))


Fixed submission:
import sys
for e in sys.stdin:print(int(float(e)**2/98+2))
Buggy python submission (verdict: Runtime Error):
import sys
e=iter(map(lambda a:a.split(),sys.stdin))
for a,b in zip(e,e):
 h=0;for s,t in zip(a,b):h+=s==t
 print(h,4-len(set(a)-set(b))-h)


Fixed submission:
import sys
e=iter(map(lambda a:a.split(),sys.stdin))
for a,b in zip(e,e):
 h=0
 for s,t in zip(a,b):h+=s==t
 print(h,4-len(set(a)-set(b))-h)

Buggy python submission (verdict: Runtime Error):
import sys
e=iter(sys.stdin)
for a,b in zip(e,e):
 a,b=a.split(),b.split()
 for s,t in zip(a,b):h+=s==t
 print(h,4-len(set(a)-set(b))-h)


Fixed submission:
import sys
e=iter(map(lambda a:a.split(),sys.stdin))
for a,b in zip(e,e):
 h=0
 for s,t in zip(a,b):h+=s==t
 print(h,4-len(set(a)-set(b))-h)
Buggy python submission (verdict: Runtime Error):
while 1:
 n,s=map(int,input().split())
 if n:print(len([1 for i in range(0,8)for j in range(i+1,9)if j<s-i-j<=9]))


Fixed submission:
import itertools
for e in iter(input,'0 0'):
 n,s=map(int,e.split())
 print(sum(s==sum(p)for p in itertools.combinations(range(10),n)))

Buggy python submission (verdict: Runtime Error):
from itertools import combinations
while 1:
 n,s=map(int,input().split())
 if n:print(sum(1 for p in combinations(range(10),n)if sum(p)==s))


Fixed submission:
import itertools
for e in iter(input,'0 0'):
 n,s=map(int,e.split())
 print(sum(s==sum(p)for p in itertools.combinations(range(10),n)))

Buggy python submission (verdict: Runtime Error):
from itertools import combinations
while 1:
 n,s=map(int,input().split())
 if n+x==0:break
 print(sum(1 for p in combinations(range(10),n)if sum(p)==s))


Fixed submission:
import itertools
for e in iter(input,'0 0'):
 n,s=map(int,e.split())
 print(sum(s==sum(p)for p in itertools.combinations(range(10),n)))

Buggy python submission (verdict: Runtime Error):
from itertools import combinations
while 1:
 n,s=map(int,input().split())
 if n:print(sum([1 for p in combinations(range(10),n)if sum(p)==s]))


Fixed submission:
import itertools
for e in iter(input,'0 0'):
 n,s=map(int,e.split())
 print(sum(s==sum(p)for p in itertools.combinations(range(10),n)))

Buggy python submission (verdict: Runtime Error):
from itertools import combinations
while 1:
 n,s=map(int,input().split())
 if n:print(sum(1 for p in combinations(range(10),n)if sum(p)==s))


Fixed submission:
import itertools
for e in iter(input,'0 0'):
 n,s=map(int,e.split())
 print(sum(s==sum(p)for p in itertools.combinations(range(10),n)))
Buggy python submission (verdict: Runtime Error):
while 1:print(*[int(b)*2**i for i,b in enumerate(bin(int(input()))[2:][::-1])if int(b)])


Fixed submission:
import sys
for d in sys.stdin:print(*[w for w in[2**i for i in range(10)]if int(d)&w])

Buggy python submission (verdict: Runtime Error):
import sys
while 1:print(*[int(b)*2**i for i,b in enumerate(bin(int(sys.stdin.readline()))[2:][::-1])if int(b)])


Fixed submission:
import sys
for d in sys.stdin:print(*[w for w in[2**i for i in range(10)]if int(d)&w])
Buggy python submission (verdict: Runtime Error):
import sys
for e in sys.stdin:
 e=sorted(map(int,e.split(',')))
 print([['null','straight'][e[4]-e[0]==4 or e[0]*10==e[1]],'one pair','two pair','three card','full house',0,'four card'][(sum(e.count(s)for s in e)//2-2])


Fixed submission:
import sys
for e in sys.stdin:
 e=sorted(map(int,e.split(',')))
 print([['null','straight'][e[0]*9<e[1]or e[4]-e[0]<5],'one pair','two pair','three card','full house',0,'four card'][sum(e.count(s)for s in e)//2-2])