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*d12) y3 == compare (xp*d12) yp) &&
   (compare (x1*d23) y1 == compare (xp*d23) yp) &&
   (compare (x2*d31) y2 == compare (xp*d31) yp)
  where
   d12 = (y2-y1)/(x2-x1)
   d23 = (y3-y2)/(x3-x2)
   d31 = (y1-y3)/(x1-x3)
   d1p = (yp-y1)/(xp-x1)
   d2p = (yp-y2)/(xp-x2)
   d3p = (yp-y3)/(xp-x3)