import sys

def side(p1, p2, p3): return (p3[1]-p1[1])*(p2[0]-p1[0])-(p2[1]-p1[1])*(p3[0]-p1[0])>0

 

for s in sys.stdin:

  x = list(map(float, s.split()))

  p1 = x[0:2]

  p2 = x[2:4]

  p3 = x[4:6]

  p0 = x[6:]

  print(["NO","YES"][(side(p1, p2, p0)==side(p2, p3, p0) and side(p2, p3, p0)==side(p3, p1, p0))])
import sys

def side(p1, p2, p3): return (p3[1]-p1[1])*(p2[0]-p1[0])-(p2[1]-p1[1])*(p3[0]-p1[0])>0

 

for s in sys.stdin:

  x = list(map(float, s.split()))

  p1 = x[0:2]

  p2 = x[2:4]

  p3 = x[4:6]

  p0 = x[6:]

  print(["NO","YES"][(side(p1, p2, p0)==side(p2, p3, p0)==side(p3, p1, p0))])
import sys


def side(p1, p2, p3):
    return (p3[1] - p1[1]) * (p2[0] - p1[0]) - (p2[1] - p1[1]) * (p3[0] - p1[0]) > 0


for s in sys.stdin:
    x = list(map(float, s.split()))
    p1 = x[0:2]
    p2 = x[2:4]
    p3 = x[4:6]
    p0 = x[6:]
    print(
        ["NO", "YES"][
            (
                side(p1, p2, p0) == side(p2, p3, p0)
                and side(p2, p3, p0) == side(p3, p1, p0)
            )
        ]
    )

import sys


def side(p1, p2, p3):
    return (p3[1] - p1[1]) * (p2[0] - p1[0]) - (p2[1] - p1[1]) * (p3[0] - p1[0]) > 0


for s in sys.stdin:
    x = list(map(float, s.split()))
    p1 = x[0:2]
    p2 = x[2:4]
    p3 = x[4:6]
    p0 = x[6:]
    print(["NO", "YES"][(side(p1, p2, p0) == side(p2, p3, p0) == side(p3, p1, p0))])

-    print( -        ["NO", "YES"][ -            ( -                side(p1, p2, p0) == side(p2, p3, p0) -                and side(p2, p3, p0) == side(p3, p1, p0) -            ) -        ] -    ) +    print(["NO", "YES"][(side(p1, p2, p0) == side(p2, p3, p0) == side(p3, p1, p0))])