import std.stdio;
import std.array;
import std.conv;
import std.algorithm;
import std.string;
import std.numeric;
bool area(double[2] p1, double[2] p2, double[2] p3){
	double[2] px1 = [p2[0]-p1[0],p2[1]-p1[1]];
	double[2] px2 = [p3[0]-p1[0],p3[1]-p1[1]];
	return (px1[1]*px2[0]-px1[0]*px2[1]) < 0;
}
void main() {
	string s;
	while( (s=readln().strip()).length != 0 ){
		auto i = s.split(',').map!(to!double)().array();
		bool f0=area([i[0],i[1]],[i[2],i[3]],[i[4],i[5]]);
		bool f1=area([i[0],i[1]],[i[4],i[5]],[i[6],i[7]]);
		bool f2=area([i[2],i[3]],[i[4],i[5]],[i[6],i[7]]);
		bool f3=area([i[2],i[3]],[i[6],i[7]],[i[0],i[1]]);
		bool f4=area([i[4],i[5]],[i[6],i[7]],[i[0],i[1]]);
		bool f5=area([i[4],i[5]],[i[0],i[1]],[i[2],i[3]]);
		bool f6=area([i[6],i[7]],[i[0],i[1]],[i[2],i[3]]);
		bool f7=area([i[6],i[7]],[i[2],i[3]],[i[4],i[5]]);
		if(f0==f1&&f1==f2&&f2==f3&&f3==f4&&f4==f5&&f5==f6&&f6==f7) writeln("YES");
		else writeln("NO");
	}
}