require 'scanf'

def op(a, b)
    a[0]*b[1]-a[1]*b[0]
end

while str = STDIN.gets
    l = str.scanf("%f,%f,%f,%f,\
                   %f,%f,%f,%f")
    f1, f2 = true, true
    for i in 0..(4-1) do
        x1, y1 = l[i*2+0], l[i*2+1]
        x2, y2 = l[(i*2+2)%8], l[(i*2+3)%8]
        x3, y3 = l[(i*2+4)%8], l[(i*2+5)%8]
        a = [x1-x2, y1-y2]
        b = [x3-x2, y3-y2]
        f1 &= (op(a,b)>0.0)
        f2 &= (op(a,b)<0.0)
    end
    print(if f1 or f2; "YES\n" else "NO\n" end)
end