let getv (x0,y0) (x1,y1) = (x1-.x0, y1-.y0);;
let cross (x0,y0) (x1,y1) = x0*.y1-.x1*.y0;;

let () =
  let rec read () =
    try let p0,p1,p2,p3 = Scanf.scanf " %f,%f,%f,%f,%f,%f,%f,%f\n" (fun xa ya xb yb xc yc xd yd-> (xa, ya),(xb, yb),(xc, yc),(xd, yd)) in
        if (cross (getv p0 p2) (getv p0 p1))*.(cross (getv p0 p2) (getv p0 p3)) < 0.
           && (cross (getv p1 p3) (getv p1 p2))*.(cross (getv p1 p3) (getv p1 p0)) < 0. then print_endline "YES"
        else print_endline "NO"
        ; read ()
    with End_of_file -> ()
  in read ()
;;