import sys


def main():
    for line in sys.stdin:
        p = map(float, line.strip().split(','))

        xa = p[0]
        ya = p[1]
        xb = p[2]
        yb = p[3]
        xc = p[4]
        yc = p[5]
        xd = p[6]
        yd = p[7]

        v1 = Vector2D(xb - xa, yb - ya)
        v2 = Vector2D(xc - xb, yc - yb)
        v3 = Vector2D(xd - xc, yd - yc)
        v4 = Vector2D(xa - xd, ya - yd)

        result = True

        if Vector2D.exterior_product(v1, v2) <= 0:
            result = False
        if Vector2D.exterior_product(v2, v3) <= 0:
            result = False
        if Vector2D.exterior_product(v3, v4) <= 0:
            result = False
        if Vector2D.exterior_product(v4, v1) <= 0:
            result = False

        print 'YES' if result else 'NO'


class Vector2D:

    def __init__(self, x, y):
        self.x = x
        self.y = y

    @classmethod
    def inner_product(cls, v1, v2):
        return v1.x * v2.x + v1.y * v2.y

    @classmethod
    def exterior_product(cls, v1, v2):
        return v1.x * v2.y - v1.y * v2.x

    def __str__(self):
        return "(%f, %f)" % (self.x, self.y)


main()