Buggy python submission (verdict: Runtime Error):
import numpy
while True:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
        AB=numpy.array([x2-x1,y2-y1])
        AP=numpy.array([xp-x1,yp-y1])
        BC=numpy.array([x3-x2,y3-y2])
        BP=numpy.array([xp-x2,yp-y2])
        CA=numpy.array([x1-x3,y1-y3])
        CP=numpy.array([xp-x3,yp-y3])

        if (numpy.cross(AB,AP) < 0 and numpy.cross(BC,BP) < 0 and numpy.cross(CA,CP) < 0) or\
        (numpy.cross(AB,AP) > 0 and numpy.cross(BC,BP) > 0 and numpy.cross(CA,CP) > 0):
            print "YES"
        else:
            print "NO"
    except:
        break


Fixed submission:
def f(a,b,c,d):
    return a*d-b*c

while True:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
        AB=[x2-x1,y2-y1]
        AP=[xp-x1,yp-y1]
        BC=[x3-x2,y3-y2]
        BP=[xp-x2,yp-y2]
        CA=[x1-x3,y1-y3]
        CP=[xp-x3,yp-y3]
        #print AB
        #print BC
        #print CA
        #print AP
        #print BP
        #print CP
        #print f(AB[0],AB[1],AP[0],AP[1])
        #print f(BC[0],BC[1],BP[0],BP[1])
        #print f(CA[0],CA[1],CP[0],CP[1])
        if (f(AB[0],AB[1],AP[0],AP[1]) < 0 and f(BC[0],BC[1],BP[0],BP[1]) < 0 and f(CA[0],CA[1],CP[0],CP[1]) < 0) or\
        (f(AB[0],AB[1],AP[0],AP[1]) > 0 and f(BC[0],BC[1],BP[0],BP[1]) > 0 and f(CA[0],CA[1],CP[0],CP[1]) > 0):
            print "YES"
        else:
            print "NO"
    except:
        break

Buggy python submission (verdict: Runtime Error):
import numpy
while True:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
        AB=numpy.array([x2-x1,y2-y1])
        AP=numpy.array([xp-x1,yp-y1])
        BC=numpy.array([x3-x2,y3-y2])
        BP=numpy.array([xp-x2,yp-y2])
        CA=numpy.array([x1-x3,y1-y3])
        CP=numpy.array([xp-x3,yp-y3])
        #print numpy.cross(AB,AP)
        if (numpy.cross(AB,AP) < 0 and numpy.cross(BC,BP) < 0 and numpy.cross(CA,CP) < 0) or\
        (numpy.cross(AB,AP) > 0 and numpy.cross(BC,BP) > 0 and numpy.cross(CA,CP) > 0):
            print "YES"
        else:
            print "NO"
    except:
        break


Fixed submission:
def f(a,b,c,d):
    return a*d-b*c

while True:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
        AB=[x2-x1,y2-y1]
        AP=[xp-x1,yp-y1]
        BC=[x3-x2,y3-y2]
        BP=[xp-x2,yp-y2]
        CA=[x1-x3,y1-y3]
        CP=[xp-x3,yp-y3]
        #print AB
        #print BC
        #print CA
        #print AP
        #print BP
        #print CP
        #print f(AB[0],AB[1],AP[0],AP[1])
        #print f(BC[0],BC[1],BP[0],BP[1])
        #print f(CA[0],CA[1],CP[0],CP[1])
        if (f(AB[0],AB[1],AP[0],AP[1]) < 0 and f(BC[0],BC[1],BP[0],BP[1]) < 0 and f(CA[0],CA[1],CP[0],CP[1]) < 0) or\
        (f(AB[0],AB[1],AP[0],AP[1]) > 0 and f(BC[0],BC[1],BP[0],BP[1]) > 0 and f(CA[0],CA[1],CP[0],CP[1]) > 0):
            print "YES"
        else:
            print "NO"
    except:
        break

Buggy python submission (verdict: Runtime Error):
import numpy
while True:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
        AB=numpy.array([x2-x1,y2-y1])
        AP=numpy.array([xp-x1,yp-y1])
        BC=numpy.array([x3-x2,y3-y2])
        BP=numpy.array([xp-x2,yp-y2])
        CA=numpy.array([x1-x3,y1-y3])
        CP=numpy.array([xp-x3,yp-y3])
        #print numpy.cross(AB,AP)
        if (numpy.cross(AB,AP) < 0 and numpy.cross(BC,BP) < 0 and numpy.cross(CA,CP) < 0) or\
        (numpy.cross(AB,AP) > 0 and numpy.cross(BC,BP) > 0 and numpy.cross(CA,CP) > 0):
            print 'YES'
        else:
            print 'NO'
    except:
        break


Fixed submission:
def f(a,b,c,d):
    return a*d-b*c

while True:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp=map(float,raw_input().split())
        AB=[x2-x1,y2-y1]
        AP=[xp-x1,yp-y1]
        BC=[x3-x2,y3-y2]
        BP=[xp-x2,yp-y2]
        CA=[x1-x3,y1-y3]
        CP=[xp-x3,yp-y3]
        #print AB
        #print BC
        #print CA
        #print AP
        #print BP
        #print CP
        #print f(AB[0],AB[1],AP[0],AP[1])
        #print f(BC[0],BC[1],BP[0],BP[1])
        #print f(CA[0],CA[1],CP[0],CP[1])
        if (f(AB[0],AB[1],AP[0],AP[1]) < 0 and f(BC[0],BC[1],BP[0],BP[1]) < 0 and f(CA[0],CA[1],CP[0],CP[1]) < 0) or\
        (f(AB[0],AB[1],AP[0],AP[1]) > 0 and f(BC[0],BC[1],BP[0],BP[1]) > 0 and f(CA[0],CA[1],CP[0],CP[1]) > 0):
            print "YES"
        else:
            print "NO"
    except:
        break