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 v3 =
  let Pt (xv, yv), Pt (xu, yu) = (sub_vector v1 v2), (sub_vector v2 v3) 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 x4 y4 ->
        let p1, p2, p3, p4 = Pt (x1, y1), Pt (x2, y2), Pt (x3, y3), Pt (x4, y4) in
        let sign = cross_sign p1 p2 p3 in
        let is_convex =
          List.for_all (fun (p, q, r) -> sign = cross_sign p q r)
                       [(p2, p3, p4); (p3, p4, p1); (p4, p1, p2)] in
        print_endline @@ if is_convex then "YES" else "NO"
      end;
    loop ()
  with End_of_file -> ()

let () = loop ();