import Control.Applicative
import Control.Monad

main :: IO ()
main = do
  ls <- lines <$> getContents
  forM_ ls $ \l -> do
    let [x1,y1,x2,y2,x3,y3,xp,yp] = map read $ words l
        cr1 = cross (x2-x1) (y2-y1) (xp-x1) (yp-y1)
        cr2 = cross (x3-x2) (y3-y2) (xp-x2) (yp-y2)
        cr3 = cross (x1-x3) (y1-y3) (xp-x3) (yp-y3)
    putStrLn $ if cr1>0 && cr2>0 && cr3>0 || cr1<0 && cr2<0 && cr3<0
      then "YES"
      else "NO"

cross :: Double -> Double -> Double -> Double -> Double
cross x1 y1 x2 y2 = x1*y2 - y1*x2