type point = {x: float; y: float}

let distance a b =
    ((a.x -. b.x)**2.0 +. (a.y -. b.y)**2.0)**0.5

let area a b c =
    let s = (a +. b +. c) /. 2.0 in
    (s *. (s -. a) *. (s -. b) *. (s -. c))**0.5

let () =
    try
        while true do
            let (a, b, c, p)  = Scanf.scanf "%f %f %f %f %f %f %f %f\n"
                (fun ax ay bx by cx cy px py -> {x = ax; y = ay}, {x = bx; y = by}, {x = cx; y = cy}, {x = px; y = py}) in

            let area1 = area (distance a b) (distance b c) (distance c a) in
            let area2 = (area (distance p b) (distance b c) (distance c p))
                     +. (area (distance a p) (distance p c) (distance c a))
                     +. (area (distance a b) (distance b p) (distance p a)) in

            let diff   = (abs_float (area1 -. area2)) in
            let result = if diff < 0.000001 then "YES" else "NO" in
            Printf.printf "%s\n" result
        done
    with
        End_of_file -> ()