
import sys


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


class Quadrangle:
    def __init__(self, p1, p2, p3, p4):
        self.p1 = p1
        self.p2 = p2
        self.p3 = p3
        self.p4 = p4

    def isconvex(self):
        d1 = direction_of_rotation(self.p1, self.p2, self.p3)
        d2 = direction_of_rotation(self.p2, self.p3, self.p4)
        d3 = direction_of_rotation(self.p3, self.p4, self.p1)
        d4 = direction_of_rotation(self.p4, self.p1, self.p2)
        if d1 == d2 == d3 == d4:
            return 'YES'
        else:
            return 'NO'


def direction_of_rotation(p1, p2, p3):
    d = p1.x * (p2.y - p3.y) + p2.x * (p3.y - p1.y) + p3.x * (p1.y - p2.y)
    if d < 0:
        direction = 'right'
    else:
        direction = 'left'
    return direction


for line in sys.stdin:
    a = map(float, line.split(','))
    p1 = Point(a[0], a[1])
    p2 = Point(a[2], a[2])
    p3 = Point(a[4], a[5])
    p4 = Point(a[6], a[7])
    q = Quadrangle(p1, p2, p3, p4)
    print q.isconvex()