# -*- coding: utf-8 -*-

import sys

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

def is_same_side(p1, p2, p3, p4):
    a = -(p1.y-p2.y)
    b = p1.x-p2.x
    c = p2.x*p1.y-p2.y*p1.x
    if (a*p3.x+b*p3.y+c) * (a*p4.x+b*p4.y+c) >= 0:
        return True
    else:
        return False

for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, line.split(','))
    p1 = Point_class(x1, y1)
    p2 = Point_class(x2, y2)
    p3 = Point_class(x3, y3)
    p4 = Point_class(x4, y4)
    if is_same_side(p1, p3, p2, p4) or is_same_side(p2, p4, p1, p3):
        print "NO"
    else:
        print "YES"