import fileinput

for line in fileinput.input():
    xa, ya, xb, yb, xc, yc, xd, yd = map(float, line.split(','))
    x = ((yb * xd - yd * xb) * (xc - xa) - (ya * xc - yc * xa) * (xd - xb)) \
        / ((yc - ya) * (xd - xb) - (yd - yb) * (xc - xa))
    print('NO' if (x - xa) * (x - xc) > 0 or (x - xb) * (x - xd) > 0 else 'YES')