import Data.List

solve :: [Float] -> String
solve [x, y, x1, y1, x2, y2, x3, y3]
  | x1 == x2 = if x1 < x && y > (y3 - y1) / (x3 - x1) * (x - x1) + y1 && y < (y3 - y2) / (x3 - x2) * (x - x2) + y2 then "YES" else "NO"
  | x2 == x3 = if x < x2 && y > (y2 - y1) / (x2 - x1) * (x - x1) + y1 && y < (y3 - y1) / (x3 - x1) * (x - x1) + y1 then "YES" else "NO"
  | y2 > (y3 - y1) / (x3 - x1) * (x2 - x1) + y1 = if y < (y2 - y1) / (x2 - x1) * (x - x1) + y1 && y > (y3 - y1) / (x3 - x1) * (x - x1) + y1 && y < (y3 - y2) / (x3 - x2) * (x - x2) + y2 then "YES" else "NO"
  | otherwise = if y > (y2 - y1) / (x2 - x1) * (x - x1) + y1 && y < (y3 - y1) / (x3 - x1) * (x - x1) + y1 && y > (y3 - y2) / (x3 - x2) * (x - x2) + y2 then "YES" else "NO"

create :: [Float] -> [[Float]]
create [] = []
create (x:y:xs) = (x : y : []) : create xs

main = getContents >>= mapM_ putStrLn . map (solve . (\x -> concat $ (drop 6 x :) $ sort $ create $ take 6 x) . map read . words) . lines