import std.stdio: writeln, stdin;
import std.algorithm, std.string, std.conv, std.range;

double cross(T)(T a, T b, T c)
{
    return (a[0] - b[0]) * (b[1] - c[1]) - (a[1] - b[1]) * (b[0] - c[0]);
}

void main()
{
    foreach(input; stdin.byLine().map!(line => line.split(",").map!(to!double).chunks(2).cycle))
    {
        double[4] cs;
        foreach(i, ref c; cs)
        {
            c = cross(input[i], input[i + 1], input[i + 2]);
        }
        if(cs[0] > 0 && cs[1] > 0 && cs[2] > 0 && cs[3] > 0 || cs[0] < 0 && cs[1] < 0 && cs[2] < 0 && cs[3] < 0)
        {
            "YES".writeln;
        }
        else
        {
            "NO".writeln;
        }
    }
}