def distance(ax,ay,bx,by):
    return (ax-bx)**2+(ay-by)**2

def yogen(plist, st):
    a = distance(plist[st], plist[st+1], plist[st+2], plist[st+3])
    b = distance(plist[st+2], plist[st+3], plist[st+4], plist[st+5])
    c = distance(plist[st+4], plist[st+5], plist[st], plist[st+1])
    return a+b-c >= 0

while True:
    try:
        points = list(map(float, input().split(",")))
        points.extend(points)
        if yogen(points, 0) and yogen(points, 2) and yogen(points, 4) and yogen(points, 6): print("YES")
        else: print("NO")

    except EOFError: break