import scala.io.Source.stdin

object Main {
  def v(x:(Double,Double),y:(Double,Double)) = (x,y) match { case ((x0,y0),(x1,y1)) => (x1-x0,y1-y0) }
  def cross(x:(Double,Double),y:(Double,Double)) = (x,y) match { case ((x0,y0),(x1,y1)) => x0*y1-x1*y0 }

  def main(args:Array[String]) = {
    val b = new StringBuilder

    for(l<-stdin.getLines.map(s=>s.split(",").map(_.toDouble))) {
      val v01 = v((l(0),l(1)), (l(2),l(3)))
      val v02 = v((l(0),l(1)), (l(4),l(5)))
      val v03 = v((l(0),l(1)), (l(6),l(7)))
      val v10 = v((l(2),l(3)), (l(0),l(1)))
      val v12 = v((l(2),l(3)), (l(4),l(5)))
      val v13 = v((l(2),l(3)), (l(6),l(7)))
      if(cross(v02, v01)*cross(v02,v03) < 0
          && cross(v13,v12)*cross(v13,v10) < 0)
        b.append("YES\n")
      else
        b.append("NO\n")
    }
    print(b.result)
  }
}