Buggy python submission (verdict: Runtime Error):
class Point(object):
    x = 0.0
    y = 0.0
    def __init__(self, x, y):
        self.x = x
        self.y = y
    def __sub__(left, right):
        return Point(left.x - right.x, left.y - right.y)
    #cross
    def __mul__(left, right):
        return left.x * right.y - left.y * right.x

while True:
    try:
        (x1, y1, x2, y2, x3, y3, x4, y4) = [int(i) for i in raw_input().split()]
    except EOFError:
        break
    a = Point(x1, y1)
    b = Point(x2, y2)
    c = Point(x3, y3)
    d = Point(x4, y4)
    ab = a - b
    cd = c - d
    if(a * b == 0):
        print 'YES'
    else:
        print 'NO'

Fixed submission:
for i in range(int(raw_input())):
    (x1, y1, x2, y2, x3, y3, x4, y4) = map(float,raw_input().split())
    x1 -= x2
    y1 -= y2
    x3 -= x4
    y3 -= y4
    if(x1 == 0 or x3 == 0):
        if(x1 == 0 and x3 == 0):
            print 'YES'
        else:
            print 'NO'
    else:
        if(y1 / x1 == y3 / x3):
            print 'YES'
        else:
            print 'NO'

Buggy python submission (verdict: Runtime Error):
class Point(object):
    x = 0.0
    y = 0.0
    def __init__(self, x, y):
        self.x = x
        self.y = y
    def __sub__(left, right):
        return Point(left.x - right.x, left.y - right.y)
    #cross
    def __mul__(left, right):
        return left.x * right.y - left.y * right.x

for i in range(int(raw_input())):
    (x1, y1, x2, y2, x3, y3, x4, y4) = [int(i) for i in raw_input().split()]
    a = Point(x1, y1)
    b = Point(x2, y2)
    c = Point(x3, y3)
    d = Point(x4, y4)
    ab = a - b
    cd = c - d
    if(a * b == 0):
        print 'YES'
    else:
        print 'NO'

Fixed submission:
for i in range(int(raw_input())):
    (x1, y1, x2, y2, x3, y3, x4, y4) = map(float,raw_input().split())
    x1 -= x2
    y1 -= y2
    x3 -= x4
    y3 -= y4
    if(x1 == 0 or x3 == 0):
        if(x1 == 0 and x3 == 0):
            print 'YES'
        else:
            print 'NO'
    else:
        if(y1 / x1 == y3 / x3):
            print 'YES'
        else:
            print 'NO'

Buggy python submission (verdict: Runtime Error):
class Point(object):
    x = 0.0
    y = 0.0
    def __init__(self, x, y):
        self.x = x
        self.y = y
    def __sub__(left, right):
        return Point(left.x - right.x, left.y - right.y)
    #cross
    def __mul__(left, right):
        return left.x * right.y - left.y * right.x

for i in range(int(raw_input())):
    (x1, y1, x2, y2, x3, y3, x4, y4) = [float(i) for i in raw_input().split()]
    a = Point(x1, y1)
    b = Point(x2, y2)
    c = Point(x3, y3)
    d = Point(x4, y4)
    ab = a - b
    cd = c - d
    if(a * b == 0.0):
        print 'YES'
    elif(a * (Point - b) == 0.0):
        print 'YES'
    else:
        print 'NO'

Fixed submission:
for i in range(int(raw_input())):
    (x1, y1, x2, y2, x3, y3, x4, y4) = map(float,raw_input().split())
    x1 -= x2
    y1 -= y2
    x3 -= x4
    y3 -= y4
    if(x1 == 0 or x3 == 0):
        if(x1 == 0 and x3 == 0):
            print 'YES'
        else:
            print 'NO'
    else:
        if(y1 / x1 == y3 / x3):
            print 'YES'
        else:
            print 'NO'