import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

void main()
{
    foreach(s;stdin.byLine())
    {
        auto a = s.split(",").map!(to!real).array();
        immutable n = a.length, n2=n/2;
        auto v = iota(n2).map!"a*2"().map!(i=>[a[(i+2)%n]-a[i],a[(i+3)%n]-a[i+1]]).array();
        auto c = zip(v,cycle(v).drop(1).take(n2)).map!"a[0][0]*a[1][1]-a[1][0]*a[0][1]"().array();
        writeln((c.all!"a>0"() || c.all!"a<0")?"YES":"NO");
    }
}