let split s =
  Str.split (Str.regexp_string " ") s |> List.map (fun x -> float_of_string x);;

let rec read () =
  try let l = read_line () |> split |> Array.of_list in
      let (a, b, c, d, e, f) =
        (l.(2)-.l.(0), l.(4)-.l.(0), l.(3)-.l.(1), l.(5)-.l.(1),l.(6)-.l.(0), l.(7)-.l.(1)) in
      let adbc = a*.d -. b*.c in
      let (x, y) = ((e*.d -. b*.f)/.adbc, (a*.f -. e*.c)/.adbc) in
      if x > 0. && y > 0. && x +. y < 1. then
        print_endline "YES"
      else
        print_endline "NO"
      ; read ()
  with End_of_file -> ();;

let () = read ();;