Buggy python submission (verdict: Runtime Error):
while 1:
    x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]
    d_max=max((x2-x1)**2+(y2-y1)**2,(x3-x2)**2+(y3-y2)**2,(x3-x1)**2+(y3-y1)**2)
    d1,d2,d3=(x2-x1)**2+(y2-y1)**2,(x3-x2)**2+(y3-y2)**2,(x3-x1)**2+(y3-y1)**2;
    
    if max(d_max,d1,d2,d3) > d_max:
        print("No")
    else:
        print("Yes")


Fixed submission:
def cross(x, y):
    return (x.conjugate() * y).imag
 
def inside_triangle(p, x, y, z):
    a = cross(y-x, p-y)
    b = cross(z-y, p-z)
    c = cross(x-z, p-x)
    if a*b > 0 and b*c > 0:
        return True
    return False
 
import sys
 
for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
    x = complex(x1, y1)
    y = complex(x2, y2)
    z = complex(x3, y3)
    p = complex(xp, yp)
    if inside_triangle(p, x, y, z):
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):

x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]

x_vector_1to2=x2-x1;
y_vector_1to2=y2-y1;
x_vector_1to3=x3-x1;
y_vector_1to3=y3-y1;
x_vector_p=xp-x1;
y_vector_p=yp-y1;

def renritu(p,q,r,s,t,u):  # renritu(p,q,r,s,t,u) px + qy = r  sx+ty=u
    a=p; b=q; c=r; d=s; e=t; f=u;
    a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
    res_y=b1-e1;
    if res_y != 0 :
        res_y =(c1-f1)/res_y;
        res_x =(c-b*res_y)/a;
        return(res_x,res_y)
    else:
        return(-1,-1)
    
res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
if res[0]=>0 and res[1]=>0 and res[0]+res[1]<1:
    print("YES")
else:
    print("NO")
        


Fixed submission:
def cross(x, y):
    return (x.conjugate() * y).imag
 
def inside_triangle(p, x, y, z):
    a = cross(y-x, p-y)
    b = cross(z-y, p-z)
    c = cross(x-z, p-x)
    if a*b > 0 and b*c > 0:
        return True
    return False
 
import sys
 
for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
    x = complex(x1, y1)
    y = complex(x2, y2)
    z = complex(x3, y3)
    p = complex(xp, yp)
    if inside_triangle(p, x, y, z):
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
while(true):

    x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]

    x_vector_1to2=x2-x1;
    y_vector_1to2=y2-y1;
    x_vector_1to3=x3-x1;
    y_vector_1to3=y3-y1;
    x_vector_p=xp-x1;
    y_vector_p=yp-y1;

    def renritu(p,q,r,s,t,u):  # renritu(p,q,r,s,t,u) px + qy = r  sx+ty=u
        a=p; b=q; c=r; d=s; e=t; f=u;
        a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
        res_y=b1-e1;
        if res_y != 0 :
            res_y =(c1-f1)/res_y;
            res_x =(c-b*res_y)/a;
            return(res_x,res_y)
        else:
            return(-1,-1)

    res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
    if res[0] >0 and res[1] >0 and (res[0]+res[1])<1:
        print("YES")
    else:
        print("NO")



Fixed submission:
def cross(x, y):
    return (x.conjugate() * y).imag
 
def inside_triangle(p, x, y, z):
    a = cross(y-x, p-y)
    b = cross(z-y, p-z)
    c = cross(x-z, p-x)
    if a*b > 0 and b*c > 0:
        return True
    return False
 
import sys
 
for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
    x = complex(x1, y1)
    y = complex(x2, y2)
    z = complex(x3, y3)
    p = complex(xp, yp)
    if inside_triangle(p, x, y, z):
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
while(True):

    x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]

    x_vector_1to2=x2-x1;
    y_vector_1to2=y2-y1;
    x_vector_1to3=x3-x1;
    y_vector_1to3=y3-y1;
    x_vector_p=xp-x1;
    y_vector_p=yp-y1;

    def renritu(p,q,r,s,t,u):  # renritu(p,q,r,s,t,u) px + qy = r  sx+ty=u
        a=p; b=q; c=r; d=s; e=t; f=u;
        a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
        res_y=b1-e1;
        if res_y != 0 :
            res_y =(c1-f1)/res_y;
            res_x =(c-b*res_y)/a;
            return(res_x,res_y)
        else:
            return(-1,-1)

    res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
    if res[0] >0 and res[1] >0 and (res[0]+res[1])<1:
        print("YES")
    else:
        print("NO")



Fixed submission:
def cross(x, y):
    return (x.conjugate() * y).imag
 
def inside_triangle(p, x, y, z):
    a = cross(y-x, p-y)
    b = cross(z-y, p-z)
    c = cross(x-z, p-x)
    if a*b > 0 and b*c > 0:
        return True
    return False
 
import sys
 
for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
    x = complex(x1, y1)
    y = complex(x2, y2)
    z = complex(x3, y3)
    p = complex(xp, yp)
    if inside_triangle(p, x, y, z):
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
while(True):

    x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]

    x_vector_1to2=x2-x1;
    y_vector_1to2=y2-y1;
    x_vector_1to3=x3-x1;
    y_vector_1to3=y3-y1;
    x_vector_p=xp-x1;
    y_vector_p=yp-y1;

    def renritu(p,q,r,s,t,u):  # renritu(p,q,r,s,t,u) px + qy = r  sx+ty=u
        a=p; b=q; c=r; d=s; e=t; f=u;
        a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
        res_y=b1-e1;
        if res_y != 0 :
            res_y =(c1-f1)/res_y;
            res_x =(c-b*res_y)/a;
            return(res_x,res_y)
        else:
            return(-1,-1)

    res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
    if res[0] >0 and res[1] >0 and (res[0]+res[1])<1:
        print("YES")
    else:
        print("NO")



Fixed submission:
def cross(x, y):
    return (x.conjugate() * y).imag
 
def inside_triangle(p, x, y, z):
    a = cross(y-x, p-y)
    b = cross(z-y, p-z)
    c = cross(x-z, p-x)
    if a*b > 0 and b*c > 0:
        return True
    return False
 
import sys
 
for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
    x = complex(x1, y1)
    y = complex(x2, y2)
    z = complex(x3, y3)
    p = complex(xp, yp)
    if inside_triangle(p, x, y, z):
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
while(True):

    x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]

    x_vector_1to2=x2-x1;
    y_vector_1to2=y2-y1;
    x_vector_1to3=x3-x1;
    y_vector_1to3=y3-y1;
    x_vector_p=xp-x1;
    y_vector_p=yp-y1;

    def renritu(p,q,r,s,t,u):  # renritu(p,q,r,s,t,u) px + qy = r  sx+ty=u
        a=p; b=q; c=r; d=s; e=t; f=u;
        a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
        res_y=b1-e1;
        if res_y != 0 :
            res_y =(c1-f1)/res_y;
            res_x =(c-b*res_y)/a;
            return(res_x,res_y)
        else:
            return(-1,-1)

    res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
    if res[0] >=0 and res[1] >=0 and (res[0]+res[1])<=1:
        print("YES")
    else:
        print("NO")



Fixed submission:
def cross(x, y):
    return (x.conjugate() * y).imag
 
def inside_triangle(p, x, y, z):
    a = cross(y-x, p-y)
    b = cross(z-y, p-z)
    c = cross(x-z, p-x)
    if a*b > 0 and b*c > 0:
        return True
    return False
 
import sys
 
for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
    x = complex(x1, y1)
    y = complex(x2, y2)
    z = complex(x3, y3)
    p = complex(xp, yp)
    if inside_triangle(p, x, y, z):
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
while(True):

    x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]

    x_vector_1to2=x2-x1;
    y_vector_1to2=y2-y1;
    x_vector_1to3=x3-x1;
    y_vector_1to3=y3-y1;
    x_vector_p=xp-x1;
    y_vector_p=yp-y1;

    def renritu(p,q,r,s,t,u):  # renritu(p,q,r,s,t,u) px + qy = r  sx+ty=u
        a=p; b=q; c=r; d=s; e=t; f=u;
        a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
        res_y=b1-e1;
        if res_y != 0 :
            res_y =(c1-f1)/res_y;
            res_x =(c-b*res_y)/a;
            return(res_x,res_y)
        else:
            return(-1,-1)

    res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
    if res[0] >=0 and res[1] >=0 and (res[0]+res[1])<=1:
        print('YES')
    else:
        print('NO')



Fixed submission:
def cross(x, y):
    return (x.conjugate() * y).imag
 
def inside_triangle(p, x, y, z):
    a = cross(y-x, p-y)
    b = cross(z-y, p-z)
    c = cross(x-z, p-x)
    if a*b > 0 and b*c > 0:
        return True
    return False
 
import sys
 
for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
    x = complex(x1, y1)
    y = complex(x2, y2)
    z = complex(x3, y3)
    p = complex(xp, yp)
    if inside_triangle(p, x, y, z):
        print('YES')
    else:
        print('NO')