def f(x,y,x1,y1,x2,y2):
    return (x2-x1)*y-(y2-y1)*x+x1*y2-x2*y1

while True:
    try:
        ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split(","))
        if f(ax,ay,bx,by,dx,dy)*f(cx,cy,bx,by,dx,dy) < 0 and f(dx,dy,ax,ay,cx,cy)*f(bx,by,ax,ay,cx,cy) < 0:
            print "YES"
        else: print "NO"
    except:
        break