Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
ans = []
for i in range(n):
	marks = map(float, raw_input().split())
	AB = (marks[1] - marks[3]) / (marks[0] - marks[2])
	CD = (marks[5] - marks[7]) / (marks[4] - marks[6])
	if AB == CD:
		ans.append('YES')
	else:
		ans.append('NO')
for s in ans:
	print s

Fixed submission:
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if abs((y1 - y2) * (x3 - x4) - (y3 - y4) * (x1 - x2)) < 1.e-10:
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
ans = []
for i in range(n):
	marks = map(float, raw_input().split())
	AB = (marks[1] - marks[3]) / (marks[0] - marks[2])
	CD = (marks[5] - marks[7]) / (marks[4] - marks[6])
	if AB == CD:
		ans.append('YES')
	else:
		ans.append('NO')
for s in ans:
	print s

Fixed submission:
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if abs((y1 - y2) * (x3 - x4) - (y3 - y4) * (x1 - x2)) < 1.e-10:
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
ans = []
for i in range(n):
	marks = map(float, raw_input().split())
	AB = (marks[1] - marks[3]) / (marks[0] - marks[2])
	CD = (marks[5] - marks[7]) / (marks[4] - marks[6])
	if AB == CD:
		print 'YES'
	else:
		print 'NO'

Fixed submission:
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if abs((y1 - y2) * (x3 - x4) - (y3 - y4) * (x1 - x2)) < 1.e-10:
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
for i in range(n):
	marks = map(float, raw_input().split())
	AB = (marks[1] - marks[3]) / (marks[0] - marks[2])
	CD = (marks[5] - marks[7]) / (marks[4] - marks[6])
	if AB == CD:
		print 'YES'
	else:
		print 'NO'

Fixed submission:
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if abs((y1 - y2) * (x3 - x4) - (y3 - y4) * (x1 - x2)) < 1.e-10:
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
for i in range(input()):
	ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split())
	ab = (ay - by) / (ax - bx)
	cd = (cy - dy) / (cx - dx)
	if ab == cd:
		print "YES"
	else:
		print "NO"

Fixed submission:
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if abs((y1 - y2) * (x3 - x4) - (y3 - y4) * (x1 - x2)) < 1.e-10:
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
for i in range(input()):
	ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split())
	ab = (ay - by) / (ax - bx)
	cd = (cy - dy) / (cx - dx)
	if int(ab - cd) == 0:
		print "YES"
	else:
		print "NO"

Fixed submission:
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if abs((y1 - y2) * (x3 - x4) - (y3 - y4) * (x1 - x2)) < 1.e-10:
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
for i in range(input()):
	x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
	if (x1 == x2 and x3 == x4) or (y1 == y2 and y3 == y4):
		print "YES"
		continue
	elif (y1-y2)/(x1-x2) == (y3-y4)/(x3-x4):
		print "YES"
		continue
	print "NO"

Fixed submission:
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if abs((y1 - y2) * (x3 - x4) - (y3 - y4) * (x1 - x2)) < 1.e-10:
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
for i in range(input()):
	x1, y1, x2, y2, x3, y3, x4, y4 = map(lambda x: return "%f" % x, raw_input().split())
	if (y1-y2)*(x3-x4) == (y3-y4)*(x1-x2):
		print "YES"
	else:
		print "NO"

Fixed submission:
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if abs((y1 - y2) * (x3 - x4) - (y3 - y4) * (x1 - x2)) < 1.e-10:
        print('YES')
    else:
        print('NO')