import sys

def f(h,i,j,k):

 z=(j-h)*(y-k)-(k-i)*(x-j);return([-1,1][z>0],0)[z==0]

for e in sys.stdin:

 p,q,r,s,t,u,x,y=list(map(float,e.split()))

 g=[p,q,r,s,t,u]

 print((['NO','YES'][f(*g[:4])==f(*g[2:6])==f(*g[4:],*g[:2])]))

import sys

def f(h,i,j,k):

 z=(j-h)*(y-k)-(k-i)*(x-j);return([-1,1][z>0],0)[z==0]

for e in sys.stdin:

 p,q,r,s,t,u,x,y=list(map(float,e.split()))

 print((['NO','YES'][f(p,q,r,s)==f(r,s,t,u)==f(t,u,p,q)]))

import sys


def f(h, i, j, k):
    z = (j - h) * (y - k) - (k - i) * (x - j)
    return ([-1, 1][z > 0], 0)[z == 0]


for e in sys.stdin:
    p, q, r, s, t, u, x, y = list(map(float, e.split()))
    g = [p, q, r, s, t, u]
    print((["NO", "YES"][f(*g[:4]) == f(*g[2:6]) == f(*g[4:], *g[:2])]))

import sys


def f(h, i, j, k):
    z = (j - h) * (y - k) - (k - i) * (x - j)
    return ([-1, 1][z > 0], 0)[z == 0]


for e in sys.stdin:
    p, q, r, s, t, u, x, y = list(map(float, e.split()))
    print((["NO", "YES"][f(p, q, r, s) == f(r, s, t, u) == f(t, u, p, q)]))

-    g = [p, q, r, s, t, u] -    print((["NO", "YES"][f(*g[:4]) == f(*g[2:6]) == f(*g[4:], *g[:2])])) +    print((["NO", "YES"][f(p, q, r, s) == f(r, s, t, u) == f(t, u, p, q)]))