def f(x,y,x1,y1,x2,y2):
    if x1<=x2: return (x2-x1)*y-(y2-y1)*x+x1*y2-x2*y1
    else         : 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(dx,dy,ax,ay,bx,by)*f(dx,dy,cx,cy,bx,by) < 0.0:
            if f(dx,dy,ax,ay,cx,cy)*f(bx,by,ax,ay,cx,cy) < 0.0:
                print "YES"
            else:
                print "NO"
        else:
                print "NO"
    except:
        break