data Vec2 = Vec2 Double Double deriving Eq

(/--) :: Vec2 -> Vec2 -> Vec2
(/--) (Vec2 a1 a2) (Vec2 b1 b2) = (Vec2 (a1 - b1) (a2 - b2))

-- Cross Product
(/**) :: Vec2 -> Vec2 -> Double
(/**) (Vec2 a1 a2) (Vec2 b1 b2) = a1 * b2 - a2 * b1

inTriangle :: [Double] -> String
inTriangle [x1, y1, x2, y2, x3, y3, xp, yp]
    | pa > 0 && pb > 0 && pc > 0 = "YES"
    | pa < 0 && pb < 0 && pc < 0 = "YES"
    | otherwise                  = "NO"
    where
        oa = Vec2 x1 y1
        ob = Vec2 x2 y2
        oc = Vec2 x3 y3
        op = Vec2 xp yp
        pa = (oa /-- oc) /** (op /-- oa)
        pb = (ob /-- oa) /** (op /-- ob)
        pc = (oc /-- ob) /** (op /-- oc)

main :: IO ()
main = putStr . unlines . map inTriangle . map (map read) . map words . lines =<< getContents