import System.IO (isEOF)

main = do
    quit <- isEOF
    if quit then return () else do
        input >>= output . solve
        main

type Point = (Double,Double)

input :: IO (Point,Point,Point,Point)
input = do
    line <- getLine
    let
        [ox,oy,ax,ay,bx,by,px,py] = map read $ words line
    return ((ox,oy),(ax,ay),(bx,by),(px,py))

output :: Bool -> IO ()
output x = putStrLn (if x then "YES" else "NO")

solve :: (Point,Point,Point,Point) -> Bool
solve ((ox,oy),(ax,ay),(bx,by),(px,py)) = and [s > 0.0, t > 0.0, s+t < 1.0]
    where
        s = (oby * opx - obx * opy) / (oax * oby - obx * oay)
        t = (oax * opy - oay * opx) / (oax * oby - obx * oay)
        oax = ax - ox
        oay = ay - oy
        obx = bx - ox
        oby = by - oy
        opx = px - ox
        opy = py - oy