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 is_convex va vb vc vd =
  let vba = Vector.sub vb va
  and vda = Vector.sub vd va
  and vcb = Vector.sub vc vb
  and vab = Vector.sub va vb
  and vdc = Vector.sub vd vc
  and vbc = Vector.sub vb vc
  and vad = Vector.sub va vd
  and vcd = Vector.sub vc vd
  in
  (Vector.cross vba vda > 0.0) && (Vector.cross vcb vab > 0.0) && (Vector.cross vdc vbc > 0.0) && (Vector.cross vad vcd > 0.0) || (Vector.cross vba vda < 0.0) && (Vector.cross vcb vab < 0.0) && (Vector.cross vdc vbc < 0.0) && (Vector.cross vad vcd < 0.0)

let _ = 
  try
    while true do
      let va, vb, vc, vd = Scanf.scanf "%f,%f,%f,%f,%f,%f,%f,%f\n" (fun xa ya xb yb xc yc xd yd -> (Vector.set xa ya, Vector.set xb yb, Vector.set xc yc, Vector.set xd yd)) in
      print_endline (if (is_convex va vb vc vd) then "YES" else "NO")
    done
  with
    End_of_file -> ()
        