import sys
def cross(x1,y1,x2,y2):
    return x1*y2-y1*x2
for line in sys.stdin.readlines():
    line=map(float,line.strip().split(","))
    x,y=line[0::2],line[1::2]
    xv=[x[(i+1)%4]-x[i] for i in xrange(4)]
    yv=[y[(i+1)%4]-y[i] for i in xrange(4)]
    if 0<len([i for i in xrange(4) if cross(xv[i],yv[i],xv[(i+1)%4],yv[(i+1)%4])>0])<4: print "NO"
    else:print "YES"
#temp