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
        let v0 = getv p0 p1 and
            v1 = getv p1 p2 and
            v2 = getv p2 p3 and
            v3 = getv p3 p0 in
        if (cross v0 v1) >= 0. && (cross v1 v2) >= 0. && (cross v2 v3) >= 0. && (cross v3 v0) >= 0. then
          print_endline "YES"
        else
          print_endline "NO"
        ; read ()
    with End_of_file -> ()
  in read ()
;;