main = getContents >>= mapM_ (putStrLn . fout . point_in_a_triangle . fin) . lines
fin = map (read::String->Double) . words
fout p = case p of {True->"YES"; False->"NO"} 
 
point_in_a_triangle [x1,y1,x2,y2,x3,y3,xp,yp]
 = (compare ((x3-x1)*d12+y1) y3 == compare ((xp-x1)*d12+y1) yp) &&
   (compare ((x1-x2)*d23+y2) y1 == compare ((xp-x2)*d23+y2) yp) &&
   (compare ((x2-x3)*d31+y3) y2 == compare ((xp-x3)*d31+y3) yp)
  where
   d12 = (y2-y1)/(x2-x1)
   d23 = (y3-y2)/(x3-x2)
   d31 = (y1-y3)/(x1-x3)