import java.util.*

class Vector(p1: Pair<Double, Double>, p2: Pair<Double, Double>) {
    private val x = p2.first - p1.first
    private val y = p2.second - p1.second

    fun cross(other: Vector): Double = this.x * other.y - this.y * other.x
}

fun calc(p1: Pair<Double, Double>, p2: Pair<Double, Double>, p3: Pair<Double, Double>): Boolean {
    val v1 = Vector(p1, p2)
    val v2 = Vector(p2, p3)
    return v1.cross(v2) >= 0
}

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    while (sc.hasNext()) {
        val a = sc.nextLine().split(",").map { it.toDouble() }
        val p = Array(4) { i -> Pair(a[i*2], a[i*2+1]) }
        var flag = true
        for (i in 0..3) {
            for (j in 0..3) {
                for (k in 0..3) {
                    for (l in 0..3) {
                        if (hashSetOf<Int>(i, j, k, l).size != 4) continue
                        if (hashSetOf(calc(p[j], p[i], p[l]), calc(p[k], p[j], p[l]), calc(p[i], p[k], p[l])).size == 1) {
                            //println("$i, $j, $k, ${calc(p[j], p[i], p[l])}, ${calc(p[k], p[j], p[l])}, ${calc(p[i], p[k], p[l])}")
                            flag = false
                        }

                    }
                }
            }
        }
        if (flag) println("YES")
        else println("NO")
    }
}
