module Vector =
  struct
    type t = { x: float; y:float }
    let eps = 1e-10
    let set x y = {x = x; y = y}
    let add v1 v2 = {x = v1.x +. v2.x; y = v1.y +. v2.y}
    let sub v1 v2 = {x = v1.x -. v2.x; y = v1.y -. v2.y}
    let mul v a = {x = v.x *. a; y = v.y *. a}
    let div v a = {x = v.x /. a; y = v.y /. a}
    let norm v = v.x *. v.x +. v.y *. v.y
    let abs v = sqrt (norm v)
    let dot v1 v2 = v1.x *. v2.x +. v1.y *. v2.y
    let cross v1 v2 = v1.x *. v2.y -. v1.y *. v2.x
  end


let _ =
  let cp a b c = 
    let v1 = Vector.sub b a in
    let v2 = Vector.sub c a in
    Vector.cross v1 v2 in
  try
    while true do
      let p1, p2, p3, pp = Scanf.scanf "%f %f %f %f %f %f %f %f\n" (fun x1 y1 x2 y2 x3 y3 xp yp -> ((Vector.set x1 y1), (Vector.set x2 y2), (Vector.set x3 y3), (Vector.set xp yp))) in
      let cp1 = cp p1 p2 pp in
      let cp2 = cp p2 p3 pp in
      let cp3 = cp p3 p1 pp in
      if ((cp1 > 0.) && (cp2 > 0.) && (cp3 > 0.)) || ((cp1 < 0.) && (cp2 < 0.) && (cp3 < 0.)) then
        print_endline "YES"
      else
        print_endline "NO"
    done
  with
    End_of_file -> ()