Buggy python submission (verdict: Runtime Error):
import sys

def cross(a, b):
	return (a.conjugate() * b).real
def dot(a, b):
	return (a.conjugate() * b).imag

def ccw(a, b, c):
	x = b - a
	y = c - a;
	if cross(x, y) > 0: return 1
	if cross(x, y) < 0: return -1
	if dot(x, y) < 0: return 2
	if abs(x) < abs(y): return -2
	return 0

def solve(l, p):
	x = ccw(l[0][0], l[0][1], p)
	x = int(x / abs(x))
	for i in l[1:]:
		y = ccw(i[0], i[1], p)
		y = int(y / abs(y))
		if x != y:
			print "NO"
			return
	print 'YES'

for line in sys.stdin:
	ax, ay, bx, by, cx, cy, px, py = map(float, line.split())
	a = complex(ax, ay)
	b = complex(bx, by)
	c = complex(cx, cy)
	p = complex(px, py)
	solve([(a, b), (b, c), (c, a)], p)

Fixed submission:
import sys
def cross(a, b):
	return (a.conjugate() * b).imag
def dot(a, b):
	return (a.conjugate() * b).real
def ccw(a, b, c):
	x = b - a
	y = c - a;
	cr = cross(x, y)
	if cr != 0: return cr
	if dot(x, y) < 0: return 2
	if abs(x) < abs(y): return -2
	return 0
for line in sys.stdin:
	t = map(float, line.split())
	if len(t) == 0: continue
	a, b, c, p = map(complex, t[0::2], t[1::2])
	l = [(a, b), (b, c), (c, a)]
	x = cmp(ccw(l[0][0], l[0][1], p), 0)
	if all(cmp(ccw(i[0], i[1], p), 0) == x for i in l[1:]):
		print "YES"
	else:
		print "NO"

Buggy python submission (verdict: Runtime Error):
import sys

def cross(a, b):
	return (a.conjugate() * b).real
def dot(a, b):
	return (a.conjugate() * b).imag

def ccw(a, b, c):
	x = b - a
	y = c - a;
	if cross(x, y) > 0: return 1
	if cross(x, y) < 0: return -1
	if dot(x, y) < 0: return 2
	if abs(x) < abs(y): return -2
	return 0

def solve(l, p):
	x = ccw(l[0][0], l[0][1], p)
	x = int(x / abs(x))
	for i in l[1:]:
		y = ccw(i[0], i[1], p)
		y = int(y / abs(y))
		if x != y:
			print "NO"
			return
	print 'YES'

for line in sys.stdin:
	ax, ay, bx, by, cx, cy, px, py = map(float, line.split())
	a = complex(ax, ay)
	b = complex(bx, by)
	c = complex(cx, cy)
	p = complex(px, py)
	solve([(a, b), (b, c), (c, a)], p)

Fixed submission:
import sys
def cross(a, b):
	return (a.conjugate() * b).imag
def dot(a, b):
	return (a.conjugate() * b).real
def ccw(a, b, c):
	x = b - a
	y = c - a;
	cr = cross(x, y)
	if cr != 0: return cr
	if dot(x, y) < 0: return 2
	if abs(x) < abs(y): return -2
	return 0
for line in sys.stdin:
	t = map(float, line.split())
	if len(t) == 0: continue
	a, b, c, p = map(complex, t[0::2], t[1::2])
	l = [(a, b), (b, c), (c, a)]
	x = cmp(ccw(l[0][0], l[0][1], p), 0)
	if all(cmp(ccw(i[0], i[1], p), 0) == x for i in l[1:]):
		print "YES"
	else:
		print "NO"

Buggy python submission (verdict: Runtime Error):
import sys

def cross(a, b):
	return (a.conjugate() * b).real
def dot(a, b):
	return (a.conjugate() * b).imag

def ccw(a, b, c):
	x = b - a
	y = c - a;
	if cross(x, y) > 0: return 1
	if cross(x, y) < 0: return -1
	if dot(x, y) < 0: return 2
	if abs(x) < abs(y): return -2
	return 0

def solve(l, p):
	x = ccw(l[0][0], l[0][1], p)
	if x != 0:
		x = int(x / abs(x))
	for i in l[1:]:
		y = ccw(i[0], i[1], p)
		if y != 0:
			y = int(y / abs(y))
		if x != y:
			print "NO"
			return
	print 'YES'

for line in sys.stdin:
	ax, ay, bx, by, cx, cy, px, py = map(float, line.split())
	a = complex(ax, ay)
	b = complex(bx, by)
	c = complex(cx, cy)
	p = complex(px, py)
	solve([(a, b), (b, c), (c, a)], p)

Fixed submission:
import sys
def cross(a, b):
	return (a.conjugate() * b).imag
def dot(a, b):
	return (a.conjugate() * b).real
def ccw(a, b, c):
	x = b - a
	y = c - a;
	cr = cross(x, y)
	if cr != 0: return cr
	if dot(x, y) < 0: return 2
	if abs(x) < abs(y): return -2
	return 0
for line in sys.stdin:
	t = map(float, line.split())
	if len(t) == 0: continue
	a, b, c, p = map(complex, t[0::2], t[1::2])
	l = [(a, b), (b, c), (c, a)]
	x = cmp(ccw(l[0][0], l[0][1], p), 0)
	if all(cmp(ccw(i[0], i[1], p), 0) == x for i in l[1:]):
		print "YES"
	else:
		print "NO"