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

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;
	bool u,u1;
	if(x[1] - x[3] == 0){
	    u = (x[1] - x[0]) * (x[1] - x[2]) > 0;

	}else {
	    real m = (y[1] - y[3] ) / (x[1] - x[3]);
	    u = (y[2] - m * (x[2] - x[1]) - y[1] ) * (y[0] - m * (x[0] - x[1]) - y[1] )> 0 ;
	}
	if(x[2] - x[0] == 0){
	    u1 = (x[2] - x[1]) * (x[2] - x[3]) > 0;
	}else {
	    real m = (y[0] - y[2] ) / (x[0] - x[2]);
	    u1 = (y[3] - m * (x[3] - x[2]) - y[2] ) * (y[1] - m * (x[1] - x[2]) - y[2] )> 0 ;
	}
	flg = (u1 != u);
	if(!flg) writeln("YES");
	else writeln("NO");
    }
}