type point = Pt of float * float

let sub_vector (Pt (x1, y1)) (Pt (x2, y2)) = Pt (x2 -. x1, y2 -. y1)

let cross_sign v1 v2 vp =
  let Pt (xv, yv), Pt (xu, yu) = (sub_vector v1 v2), (sub_vector v1 vp) in
  compare 0. (xv *. yu -. yv *. xu)

let rec loop () =
  try
    let line = read_line () in
    Scanf.sscanf
      line "%f %f %f %f %f %f %f %f"
      begin
        fun x1 y1 x2 y2 x3 y3 xp yp ->
        let p1 = Pt (x1, y1) in
        let p2 = Pt (x2, y2) in
        let p3 = Pt (x3, y3) in
        let pp = Pt (xp, yp) in
        let sign = cross_sign p1 p2 pp in
        let point_is_in_triangle =
          List.for_all (fun (p1, p2) -> sign = cross_sign p1 p2 pp)
                       [(p2, p3); (p3, p1)] in
        print_endline @@ if point_is_in_triangle then "YES" else "NO"
      end;
    loop ()
  with End_of_file -> ()

let () = loop ()