def sign(x):
    if x>0: return 1
    elif x==0: return 0
    else: return -1

def f0035(p1,p2,p3):
    x1, y1 = p1
    x2, y2 = p2
    x3, y3 = p3
    return sign((y3-y1)*(x2-x1)-(y2-y1)*(x3-x1))

while True:
    try:
        dt =map(float, raw_input().split(","))
    except:
        break

    p1=dt[0:2]
    p2=dt[2:4]
    p3=dt[4:6]
    p4=dt[6:8]
    if f0035(p1,p3,p2) != f0035(p1,p3,p4) and f0035(p2,p4,p1) != f0035(p2,p4,p3): print "YES"
    else: print "NO"