def get_data():
    xa,ya,xb,yb,xc,yc,xd,yd = map(float,input().split(','))
    return xa,ya,xb,yb,xc,yc,xd,yd

def dist(x1,y1,x2,y2):
    d = ((x2-x1)**2 + (y2-y1)**2)**0.5
    return d
    
def convex(xa,ya,xb,yb,xc,yc,xd,yd):
    dab = dist(xa,ya,xb,yb)
    dac = dist(xa,ya,xc,yc)
    dad = dist(xa,ya,xd,yd)
    dbc = dist(xb,yb,xc,yc)
    dbd = dist(xb,yb,xd,yd)
    dcd = dist(xc,yc,xd,yd)
    if dab > dac and dad > dac:
        print('NO')
    elif dab > dbd and dbc > dbd:
        print('NO')
    elif dbc > dac and dcd > dac:
        print('NO')
    elif dad > dbd and dcd > dbd:
        print('NO')
    else:
        print('YES')
    return 0

while True:
    try:
        xa,ya,xb,yb,xc,yc,xd,yd = get_data()
        convex(xa,ya,xb,yb,xc,yc,xd,yd)
    except EOFError:
        break