main = interact $ unlines.map solve.lines

solve :: String -> String
solve pvals = yesOrNo $ and [s+t < 1, s >0, t >0]
    where
        [vert1,vert2,vert3,p] = makePairs.map read.words $ pvals :: [[Double]]
        vectA = zipWith (-) vert2 vert1
        vectB = zipWith (-) vert3 vert1
        vectP = zipWith (-) p     vert1
        [s,t] = solveSimul vectA vectB vectP
makePairs []       = []
makePairs (x:y:ps) = [x,y] : makePairs ps

yesOrNo s = if s then "YES" else "NO"

solveSimul [a,d] [b,e] [c,f] = [s,t]
    where
        s = (c*e-b*f)/(a*e-b*d)
        t = (a*f-c*d)/(a*e-b*d)