Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def CountingSort(A,B,num):

	C = [0 for _ in range(num)]

	#C[i]にiの出現回数を記録する
	for i in A:
		C[i] += 1

	#C[i]にi以下の数の出現数を記録する =>累積度数分布を出力
	k = max(A)
	for j in range(k+1):
		C[j] += C[j-1]

	for h in range(k+1):
		B[C[A[h]]-1] = A[h]
		C[A[h]] -= 1

if __name__ == '__main__':

	num = int(input())
	A = [int(i) for i in input().split()]

	B = [0 for _ in range(num)]
	CountingSort(A,B,num)

	print(" ".join(map(str,B)))



Fixed submission:
def CountingSort(A,B,num):

	k = max(A)
	C = [0 for _ in range(k+1)]
	#C[i]にiの出現回数を記録する
	for i in A:
		C[i] += 1

	#C[i]にi以下の数の出現数を記録する =>累積度数分布を出力
	for j in range(1,k+1):
		C[j] += C[j-1]
	for h in range(num-1,-1,-1):
		B[C[A[h]]-1] = A[h]
		C[A[h]] -= 1

if __name__ == '__main__':

	num = int(input())
	A = [int(i) for i in input().split()]

	B = [0 for _ in range(num+1)]
	CountingSort(A,B,num)

	B.pop()
	print(" ".join(map(str,B)))

Buggy python submission (verdict: Runtime Error):
def CountingSort(A,B,num):

	C = [0 for _ in range(num+1)]
	#C[i]にiの出現回数を記録する
	for i in A:
		C[i] += 1

	#C[i]にi以下の数の出現数を記録する =>累積度数分布を出力
	k = max(A)
	for j in range(1,k+1):
		C[j] += C[j-1]
	for h in range(num-1,-1,-1):
		B[C[A[h]]-1] = A[h]
		C[A[h]] -= 1

if __name__ == '__main__':

	num = int(input())
	A = [int(i) for i in input().split()]

	B = [0 for _ in range(num+1)]
	CountingSort(A,B,num)

	B.pop()
	print(" ".join(map(str,B)))



Fixed submission:
def CountingSort(A,B,num):

	k = max(A)
	C = [0 for _ in range(k+1)]
	#C[i]にiの出現回数を記録する
	for i in A:
		C[i] += 1

	#C[i]にi以下の数の出現数を記録する =>累積度数分布を出力
	for j in range(1,k+1):
		C[j] += C[j-1]
	for h in range(num-1,-1,-1):
		B[C[A[h]]-1] = A[h]
		C[A[h]] -= 1

if __name__ == '__main__':

	num = int(input())
	A = [int(i) for i in input().split()]

	B = [0 for _ in range(num+1)]
	CountingSort(A,B,num)

	B.pop()
	print(" ".join(map(str,B)))
Buggy python submission (verdict: Runtime Error):
r = int(input())

m = 3.141592 * r * r
l = 3.141592 * r * 2

print("{:.5f}".format(m),"{:.5f}".format(l)) 




Fixed submission:
r = float(input())

#円の面積 = πr^2
#円周の長さ=直径*π=2πr
#print(c,d,"{:.5f}".format(e)) 

m = 3.141592653589 * r * r
l = 3.141592653589 * r * 2

print("{:.6f}".format(m),"{:.6f}".format(l))
Buggy python submission (verdict: Runtime Error):
while True:
	H,W = map(int,input().split(" "))

	if H == 0 and W == 0:
		break

	print(*["#" for _ in range(H)]) for _ in range(W)



Fixed submission:
while True:
	H,W = map(int,input().split(" "))

	if H == 0 and W == 0:
		break

	[print(*["#"*W]) for _ in range(H)]
	print()
Buggy python submission (verdict: Runtime Error):
n1,n2,n3 = map(int,input().split(" "))

list1 = [list(map(int,input().split(" "))) for _ in range(n1)]
list2 = [list(map(int,input().split(" "))) for _ in range(n2)]

mat = [[0 for _ in range(n1)] for _ in range(n3)]

for i in range(n1):
	for j in range(n2):
		for k in range(n3):
			mat[i][k] += list1[i][j] * list2[j][k]

for m in mat:
	print(*m)



Fixed submission:
n1,n2,n3 = map(int,input().split(" "))

list1 = [list(map(int,input().split(" "))) for _ in range(n1)]
list2 = [list(map(int,input().split(" "))) for _ in range(n2)]

mat = [[0 for _ in range(n3)] for _ in range(n1)]

for i in range(n1):
	for j in range(n3):
		mat[i][j]= str(sum(list1[i][k] * list2[k][j] for k in range(n2)))

for m in mat:
	print(*m)
Buggy python submission (verdict: Runtime Error):
=  int(input())
for i in range(n):
    
    tri_list = list(map(int,input().split(" ")))
    #tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")


Fixed submission:
n =  int(input())
for i in range(n):
    tri_list = list(map(int,input().split(" ")))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")

Buggy python submission (verdict: Runtime Error):
tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    k = int(input())
    tri_list = list(k.split(" "))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")


Fixed submission:
n =  int(input())
for i in range(n):
    tri_list = list(map(int,input().split(" ")))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")

Buggy python submission (verdict: Runtime Error):
tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    k = int(input())
    tri_list = list(k.split(" "))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")


Fixed submission:
n =  int(input())
for i in range(n):
    tri_list = list(map(int,input().split(" ")))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")

Buggy python submission (verdict: Runtime Error):
tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    k = int(input())
    tri_list = list(k.split(" "))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")


Fixed submission:
n =  int(input())
for i in range(n):
    tri_list = list(map(int,input().split(" ")))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")

Buggy python submission (verdict: Runtime Error):
tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    k = int(input())
    tri_list = list(k.split(" "))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")


Fixed submission:
n =  int(input())
for i in range(n):
    tri_list = list(map(int,input().split(" ")))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")
Buggy python submission (verdict: Runtime Error):
while 1:
    try:
        a,b = int(input().split())
        c = a + b
        print(len(str(c)))
    except EOFError:
        break


Fixed submission:
while 1:
    try:
        a,b = input().split()
        a = int(a)
        b = int(b)
        c = a + b
        print(len(str(c)))
    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
W = []
K = []

for i in range(20):
    W.append(int(input()))

for i in range(20):
    K.append(int(input()))

W.sort(reverse=True)
K.sort(reverse=True)

print(W[0] + W[1] + W[2])
print(K[0] + K[1] + K[2])


Fixed submission:
W = []
K = []

for i in range(10):
    W.append(int(input()))

for i in range(10):
    K.append(int(input()))

W.sort(reverse=True)
K.sort(reverse=True)

print(W[0] + W[1] + W[2] , K[0] + K[1] + K[2])
Buggy python submission (verdict: Runtime Error):
while True:
    N=int(input())
    for i in range(N):
        x1,y1,r1,x2,y2,r2=map(float,input().split())
        d=((x1-x2)**2+(y1-y2)**2)**0.5
        if r1-r2>d:
            if r1==r2+d:
                print("1")
            else:
                print("2")
        elif r2-r1>d:
            if r2==r1+d:
                print("1")
            else:
                print("-2")
        elif d<r1+r2:
            print("1")
        elif r1+r2==d:
            print("1")
        elif d>r1+r2:
            print("0")



Fixed submission:
N=int(input())
for i in range(N):
    x1,y1,r1,x2,y2,r2=map(float,input().split())
    d=((x1-x2)**2+(y1-y2)**2)**0.5
    if r1-r2>d:
        if r1==r2+d:
            print("1")
        else:
            print("2")
    elif r2-r1>d:
        if r2==r1+d:
            print("1")
        else:
            print("-2")
    elif d<r1+r2:
        print("1")
    elif r1+r2==d:
        print("1")
    elif d>r1+r2:
        print("0")
Buggy python submission (verdict: Runtime Error):
while True:
    flag=0
    v=float(input())
    t=v/9.8
    y=4.9*t**2
    N=0
    while y>5*(N-1):
        N +=1
    print(N)
    flag +=1
    if flag==50:break    



Fixed submission:
while True:
    try:
        v=float(input())
        t=v/9.8
        y=4.9*t**2
        N=0
        while y>5*(N-1):
            N +=1
        print(N)
    except:break
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
while True:
    n,s=map(int,input().split())
    if n==0 and s==0:
        break
    ans=0
    comb=itertools.combinations(range(0,s+1),n)
    for c in comb:
        if sum(c) == s:
            ans +=1
    print(ans)


Fixed submission:
def counter(rest, n, acc, to):
  if rest == 0:return acc == to
  if n == 10:return 0 
  return counter(rest - 1, n + 1, acc + n , to) + counter(rest, n + 1, acc, to)
 
while True:
  n, s = map(int, input().split())
  if not n:
    break
  print(counter(n, 0, 0, s))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
while True:
    n,s=map(int,input().split())
    if n==0 and s==0:
        break
    num=[i for i in range(0,s+1)]
    print(num)
    ans=0
    comb=itertools.combinations(num,n)
    for c in comb:
        if sum(c) == s:
            ans +=1
    print(ans)


Fixed submission:
def counter(rest, n, acc, to):
  if rest == 0:return acc == to
  if n == 10:return 0 
  return counter(rest - 1, n + 1, acc + n , to) + counter(rest, n + 1, acc, to)
 
while True:
  n, s = map(int, input().split())
  if not n:
    break
  print(counter(n, 0, 0, s))

Buggy python submission (verdict: Runtime Error):
import itertools import combinations
while True:
    n,s=map(int,input().split())
    if n==0 and s==0:
        break
    num=[i for i in range(0,s+1)]
    print(num)
    ans=0
    comb=itertools.combinations(num,n)
    for c in comb:
        if sum(c) == s:
            ans +=1
    print(ans)


Fixed submission:
def counter(rest, n, acc, to):
  if rest == 0:return acc == to
  if n == 10:return 0 
  return counter(rest - 1, n + 1, acc + n , to) + counter(rest, n + 1, acc, to)
 
while True:
  n, s = map(int, input().split())
  if not n:
    break
  print(counter(n, 0, 0, s))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
while True:
    n,s=map(int,input().split())
    if n==0 and s==0:
        break
    num=[i for i in range(0,s+1)]
    ans=0
    comb=itertools.combinations(num,n)
    for c in comb:
        if sum(c) == s:
            ans +=1
    print(ans)



Fixed submission:
def counter(rest, n, acc, to):
  if rest == 0:return acc == to
  if n == 10:return 0 
  return counter(rest - 1, n + 1, acc + n , to) + counter(rest, n + 1, acc, to)
 
while True:
  n, s = map(int, input().split())
  if not n:
    break
  print(counter(n, 0, 0, s))
Buggy python submission (verdict: Time Limit Exceeded):
hisi=0
tyou=0
while True:
    try:
        a,b,c=map(int,input().split(","))
        if a**2+b**2==c**2:
            tyou +=1
        elif a==b:
            hisi +=1
    except:
        print(tyou)
        print(hisi)


Fixed submission:
hisi=0
tyou=0
while True:
    try:
        a,b,c=map(int,input().split(","))
        if a**2+b**2==c**2:
            tyou +=1
        elif a==b:
            hisi +=1
    except:
        print(tyou)
        print(hisi)
        break
Buggy python submission (verdict: Runtime Error):
n=int(input())
for i in range(n):
    a=list(map(int,input().aplit()))
    b,c=0,0
    yes = True
    for j in range(10):
        if a[j]>b:b=a[j]
        elif a[j]>c:c=a[j]
        else:yes=False
    print("YES" if yes else "NO")


Fixed submission:
n=int(input())
for i in range(n):
    a=list(map(int,input().split()))
    b,c=0,0
    yes = True
    for j in range(10):
        if a[j]>b:b=a[j]
        elif a[j]>c:c=a[j]
        else:yes=False
    print("YES" if yes else "NO")
Buggy python submission (verdict: Time Limit Exceeded):
def trim():
    num=[]
    N=[input() for _ in range(8)]
    for x in range(8):
        for y in range(8):
            if N[y][x]=="1":
                if not num:
                    refer=(x,y)
                num.append((x,y))
    num=[(x-refer[0],y-refer[1]) for x,y in num]
    return num
def point(point):
    if point==[(0,0),(0,1),(1,0),(1,1)]:print("A")
    if point==[(0,0),(0,1),(0,2),(0,3)]:print("B")
    if point==[(1,0),(2,0),(3,0),(4,0)]:print("C")
    if point==[(0,0),(0,1),(1,-1),(1,0)]:print("D")
    if point==[(0,0),(1,0),(1,1),(2,1)]:print("E")
    if point==[(0,0),(0,1),(1,1),(1,2)]:print("F")
    if point==[(0,0),(1,-1),(1,0),(2,-1)]:print("G")
while True:
    try:
        point(trim)
    except:break


Fixed submission:
def trim(N):
    num=[]
    for x in range(8):
        for y in range(8):
            if N[y][x]=="1":
                if not num:
                    refer=(x,y)
                num.append((x,y))
    num=[(x-refer[0],y-refer[1]) for x,y in num]
    return num
def points(point):
    if point==[(0,0),(0,1),(1,0),(1,1)]:print("A")
    if point==[(0,0),(0,1),(0,2),(0,3)]:print("B")
    if point==[(0,0),(1,0),(2,0),(3,0)]:print("C")
    if point==[(0,0),(0,1),(1,-1),(1,0)]:print("D")
    if point==[(0,0),(1,0),(1,1),(2,1)]:print("E")
    if point==[(0,0),(0,1),(1,1),(1,2)]:print("F")
    if point==[(0,0),(1,-1),(1,0),(2,-1)]:print("G")
while True:
    N=[input() for _ in range(8)]
    points(trim(N))
    try:
        input()
    except:break
Buggy python submission (verdict: Runtime Error):
def marubatu():
    N=list(input())
    for koma in ["o","x"]:
        for i in range(3):
            if N[i:9:3].count(koma)==3 or N[3*i:3*i+3].count(koma)==3:return koma
        if N[0:9:4].count(koma)==3 or N[2:7:2].count(koma)==3:return koma
    return "d"
while 1:
    print(marubatu())


Fixed submission:
def marubatu():
    N=list(input())
    for koma in ["o","x"]:
        for i in range(3):
            if N[i:9:3].count(koma)==3 or N[3*i:3*i+3].count(koma)==3:return koma
        if N[0:9:4].count(koma)==3 or N[2:7:2].count(koma)==3:return koma
    return "d"
while 1:
    try:print(marubatu())
    except:break
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# ITP1_10_A

import math

pos = list(map(int, input().split()))
x = abs(pos[2] - pos[0])
y = abs(pos[3] - pos[1])

print(math.sqrt(x**2 + y**2))



Fixed submission:
# -*- coding: utf-8 -*-
# ITP1_10_A

import math

pos = list(map(float, input().split()))
x = abs(pos[2] - pos[0])
y = abs(pos[3] - pos[1])

print(math.sqrt(x**2 + y**2))
Buggy python submission (verdict: Runtime Error):
import math

inputs = inout().split(" ")

print(math.cell(inputs[2]/(inputs[0]+inputs[1]/7))


Fixed submission:
A,B,C = map(int, input().split())

days = int(C/(A+(B/7)))

while 1:
    coins = A* days + B * (days//7)

    if ( coins >= C):
        break
    else:
        days += 1

print(days)

Buggy python submission (verdict: Runtime Error):
inputs = inout().split(" ")

print(math.cell(inputs[2]/(inputs[0]+inputs[1]/7))


Fixed submission:
A,B,C = map(int, input().split())

days = int(C/(A+(B/7)))

while 1:
    coins = A* days + B * (days//7)

    if ( coins >= C):
        break
    else:
        days += 1

print(days)

Buggy python submission (verdict: Runtime Error):
inputs = input().split(" ")

print(math.ceil(inputs[2]/(inputs[0]+(inputs[1]/7))))


Fixed submission:
A,B,C = map(int, input().split())

days = int(C/(A+(B/7)))

while 1:
    coins = A* days + B * (days//7)

    if ( coins >= C):
        break
    else:
        days += 1

print(days)

Buggy python submission (verdict: Runtime Error):
inputs = input().split(" ")

print(math.ceil(inputs[2]/(inputs[0]+(inputs[1]/7))))



Fixed submission:
A,B,C = map(int, input().split())

days = int(C/(A+(B/7)))

while 1:
    coins = A* days + B * (days//7)

    if ( coins >= C):
        break
    else:
        days += 1

print(days)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
Rt = [input() for i in range(n)]
benef = int(Rt[1]) - int(Rt[0])

for i in range(n):
    for j in range(i+1,n):
      rate = int(Rt[j])-int(Rt[i])
      if rate > benef:
       benef = rate

print(benef)

Fixed submission:
n = int(input())

rt = [input() for i in range(n)]

minv = int(rt[0])
maxv = int(rt[1]) - int(rt[0])

for j in range(1,n):
    maxv = max(maxv,int(rt[j]) - minv)
    minv = min(minv,int(rt[j]))

print(maxv)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n)]
a_swap = 0

flag = 1
while flag:
    flag = 0
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = 1
       a_swap += 1

print(" ".join(a))
print(a_swap)

Fixed submission:
n = int(input())
a = list(map(str, input().split()))
a_swap = 0

flag = True
while flag:
    flag = False
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = True
       a_swap += 1

print(" ".join(a))
print(a_swap)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n)]
a_swap = 0

flag = 1
while flag:
    flag = 0
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = 1
       a_swap += 1

print(" ".join(a))
print(a_swap)

Fixed submission:
n = int(input())
a = list(map(str, input().split()))
a_swap = 0

flag = True
while flag:
    flag = False
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = True
       a_swap += 1

print(" ".join(a))
print(a_swap)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n)]
a_swap = 0

flag = 1
while flag:
    flag = 0
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = 1
       a_swap += 1

print(" ".join(a))
print(a_swap)

Fixed submission:
n = int(input())
a = list(map(str, input().split()))
a_swap = 0

flag = True
while flag:
    flag = False
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = True
       a_swap += 1

print(" ".join(a))
print(a_swap)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n)]
a_swap = 0

flag = True
while flag:
    flag = False
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = True
       a_swap += 1

print(" ".join(a))
print(a_swap)

Fixed submission:
n = int(input())
a = list(map(str, input().split()))
a_swap = 0

flag = True
while flag:
    flag = False
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = True
       a_swap += 1

print(" ".join(a))
print(a_swap)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [input() for i in range(n)]
a_swap = 0

flag = True
while flag:
    flag = False
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = True
       a_swap += 1

print(" ".join(a))
print(a_swap)

Fixed submission:
n = int(input())
a = list(map(str, input().split()))
a_swap = 0

flag = True
while flag:
    flag = False
    for j in range(n-1,0,-1):
      if int(a[j]) < int(a[j-1]):
       a[j],a[j-1] = a[j-1],a[j]
       flag = True
       a_swap += 1

print(" ".join(a))
print(a_swap)
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

d = a // b
r = a % b
f = a / b

print('{} {} {.5f}'.format(d,r,f))

Fixed submission:
a,b = map(int,input().split())

d = a // b
r = a % b
f = a / b

print('{} {} {:.6f}'.format(d,r,f))
Buggy python submission (verdict: Runtime Error):
n = int(input())

i = 1
while i <= n:
    if i % 3 == 0:
        print(" {:d}".format(i),end="")
    elif i % 10 == 3:
        print(" {:d}".format(i),end="")
    i += 1
print("")


Fixed submission:
n = int(input())

i = 1
while i <= n:
    x = i
    if x % 3 == 0:
        print(" {:d}".format(i),end="")
    else:
        while x:
            if x % 10 == 3:
                print(" {:d}".format(i),end="")
                break
            x = x // 10
    i += 1
print("")
Buggy python submission (verdict: Runtime Error):
n=int(input())
for nn in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4=list(map(float,input().split()))
    if x1==x2 and x3==x4:
        print("YES")
    else:
        if (y2-y1)/(x2-x1)==(y4-y3)/(x4-x3):
            print("YES")
        else:
            print("NO")


Fixed submission:
n=int(input())
for nn in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4=list(map(float,input().split()))
    if x2-x1==0 or x4-x3==0:
        if x1==x2 and x3==x4:
            print("YES")
        else:
            print("NO")
    else:
        if abs((y2-y1)/(x2-x1)-(y4-y3)/(x4-x3))<10**-10:
            print("YES")
        else:
            print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
while 1:
    n=int(input())
    if n==0:break
    nlist=[]
    nans=[]
    for i in range(n):
        nlist.append(int(input()))
        for j in range(i+1):
            nn=0
            for k in range(j,i+1):
                nn+=nlist[k]
            nans.append(nn)
    print(max(nans))


Fixed submission:
while 1:
    n=int(input())
    if n==0:break
    nlist=[]
    nans=-100001
    for i in range(n):
        nlist.append(int(input()))
    nkeep=0
    for i in nlist:
        if nkeep<0:
            nkeep=i
        else:
            nkeep+=i
        if nans<nkeep:nans=nkeep
    if max(nlist)<0:nans=max(nlist)
    print(nans)

Buggy python submission (verdict: Time Limit Exceeded):
while 1:
    n=int(input())
    if n==0:break
    nlist=[]
    nans=-100001
    for i in range(n):
        nlist.append(int(input()))
        for j in range(i+1):
            nn=0
            for k in range(j,i+1):
                nn+=nlist[k]
            if nans<nn:nans=nn
    print(nans)


Fixed submission:
while 1:
    n=int(input())
    if n==0:break
    nlist=[]
    nans=-100001
    for i in range(n):
        nlist.append(int(input()))
    nkeep=0
    for i in nlist:
        if nkeep<0:
            nkeep=i
        else:
            nkeep+=i
        if nans<nkeep:nans=nkeep
    if max(nlist)<0:nans=max(nlist)
    print(nans)
Buggy python submission (verdict: Time Limit Exceeded):
a,n,m=list(map(int,input().split()))
count=0
for x in range(1,m+1):
    xl=[]
    for xi in str(x):
        xl.append(int(xi))
    y=sum(xl)
    if x==(y+a)**n:count+=1
print(count)


Fixed submission:
a,n,m=list(map(int,input().split()))
count=0
check_list=[]
i=0
if a==0:i=1
while (i+a)**n<m:
    check_list.append((i+a)**n)
    i+=1
for x in check_list:
    xl=[int(i) for i in list(str(x))]
    y=sum(xl)
    if x==(y+a)**n:count+=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
a,n,m=list(map(int,input().split()))
count=0
for x in range(1,m+1):
    xl=[int(i) for i in list(str(x))]
    y=sum(xl)
    if x==(y+a)**n:count+=1
print(count)


Fixed submission:
a,n,m=list(map(int,input().split()))
count=0
check_list=[]
i=0
if a==0:i=1
while (i+a)**n<m:
    check_list.append((i+a)**n)
    i+=1
for x in check_list:
    xl=[int(i) for i in list(str(x))]
    y=sum(xl)
    if x==(y+a)**n:count+=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
a,n,m=list(map(int,input().split()))
count=0
for x in range(max(a**n,1),m+1):
    xl=[int(i) for i in list(str(x))]
    y=sum(xl)
    if x==(y+a)**n:count+=1
print(count)


Fixed submission:
a,n,m=list(map(int,input().split()))
count=0
check_list=[]
i=0
if a==0:i=1
while (i+a)**n<m:
    check_list.append((i+a)**n)
    i+=1
for x in check_list:
    xl=[int(i) for i in list(str(x))]
    y=sum(xl)
    if x==(y+a)**n:count+=1
print(count)