import std.stdio;
import std.conv;
import std.string;
import std.algorithm;

void main(){

    real[4] x;
    real[4] y;
    while(true){
	auto s = readln();
	if(stdin.eof()) break;
	auto s1 = split(chomp(s),',');
	for(int i=0;i<4;i++) x[i] = to!real(s1[2*i]);
	for(int i=0;i<4;i++) y[i] = to!real(s1[2*i+1]);
	bool flg = true;
	if(x[1] - x[3] == 0){
	    if(x[2] < x[1]) flg = true;
	    else flg = false;
	}else {
	    real m = (y[1] - y[3] ) / (x[1] - x[3]);
	    if( (y[2] - m * (x[2] - x[1]) - y[1] ) > 0) {
		if(x[1] < x[2] || x[2] < x[3])
		    flg = true;
		else flg = false;
	    }
	    else{
		flg = true;
	    }
	}
	if(!flg) writeln("YES");
	else writeln("NO");
    }
}