import std.stdio,std.string,std.conv;

double isCross(double p1_x,double p1_y,double p2_x,double p2_y,double p3_x,double p3_y,double p4_x,double p4_y)
{  
	return ( (p1_x-p2_x)*(p3_y-p1_y) + (p1_y-p2_y)*(p1_x-p3_x)) * ((p1_x-p2_x)*(p4_y-p1_y) + (p1_y-p2_y)*(p1_x-p4_x));  
}

int main()
{
	string s;
	while((s = readln.chomp).length != 0)
	{
		string[] _s = s.split(",");
		double a[8];
		foreach(i;0..8)
		{
			a[i] = _s[i].to!double;
		}

		if(isCross(a[0],a[1],a[4],a[5],a[2],a[3],a[6],a[7]) > 0.0 || isCross(a[2],a[3],a[6],a[7],a[0],a[1],a[4],a[5]) > 0.0)
		{
			writeln("NO");
		}
		else
		{
			writeln("YES");
		}
	}
	return 0;
}