import Control.Monad
import Control.Applicative
import Data.List

data Vec = Vec {getX::Double, getY::Double}

cross :: Vec -> Vec -> Double
cross v1 v2 = getX v1 * getY v2 - getX v2 * getY v1

main = do
  ss <- (map (splt toDbl) . lines) <$> getContents
  mapM_ putStrLn $ solve ss

solve :: [[Double]] -> [String]
solve ss = map innerPoint ss

toDbl :: String -> Double
toDbl s = read s

splt :: (String -> a) -> String -> [a]
splt f = map f . words

innerPoint :: [Double] -> String
innerPoint [x1, y1, x2, y2, x3, y3, xp, yp]
  | cross v1 p1 > 0 && cross v2 p2 > 0 && cross v3 p3 > 0 = "YES"
  | otherwise = "NO"
  where v1 = Vec (x2 - x1) (y2 - y1)
        v2 = Vec (x3 - x2) (y3 - y2)
        v3 = Vec (x1 - x3) (y1 - y3)
        p1 = Vec (xp - x1) (yp - y1)
        p2 = Vec (xp - x2) (yp - y2)
        p3 = Vec (xp - x3) (yp - y3)