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



def solve(l, p):

	x = cmp(ccw(l[0][0], l[0][1], p), 0)

	if any([x != cmp(ccw(i[0], i[1], p), 0) for i in l[1:]]):

		print("NO")

	else: print("YES")



for line in sys.stdin:

	t = list(map(float, line.split()))

	if len(t) == 0: continue

	a, b, c, p = list(map(lambda x, y: complex(x, y), t[0::2], t[1::2]))

	solve([(a, b), (b, c), (c, a)], p)
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



def solve(l, p):

	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")



for line in sys.stdin:

	t = list(map(float, line.split()))

	if len(t) == 0: continue

	a, b, c, p = list(map(complex, t[0::2], t[1::2]))

	solve([(a, b), (b, c), (c, a)], p)
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


def solve(l, p):
    x = cmp(ccw(l[0][0], l[0][1], p), 0)
    if any([x != cmp(ccw(i[0], i[1], p), 0) for i in l[1:]]):
        print("NO")
    else:
        print("YES")


for line in sys.stdin:
    t = list(map(float, line.split()))
    if len(t) == 0:
        continue
    a, b, c, p = list(map(lambda x, y: complex(x, y), t[0::2], t[1::2]))
    solve([(a, b), (b, c), (c, a)], p)

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


def solve(l, p):
    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")


for line in sys.stdin:
    t = list(map(float, line.split()))
    if len(t) == 0:
        continue
    a, b, c, p = list(map(complex, t[0::2], t[1::2]))
    solve([(a, b), (b, c), (c, a)], p)

-    if any([x != cmp(ccw(i[0], i[1], p), 0) for i in l[1:]]): +    if all(cmp(ccw(i[0], i[1], p), 0) == x for i in l[1:]): +        print("YES") +    else: -    else: -        print("YES") -    a, b, c, p = list(map(lambda x, y: complex(x, y), t[0::2], t[1::2])) +    a, b, c, p = list(map(complex, t[0::2], t[1::2]))