#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

//??´???AB????§?????????´???BC????§??????????RotType????¨????(A???B???C????????§??????)
//RotType = ????????¢1, ????????¢-1, ??´???0
int getRotType( double angle_a, double angle_b ){
	const int eps = 1e-8;
	const double PAI = 3.14159265358979;
	
	if( fabs(angle_a - angle_b) <= eps )
		return 0;
	if( angle_a > angle_b + PAI )
		angle_b += 2 * PAI;
	else if( angle_b > angle_a + PAI )
		angle_a += 2 * PAI;
	
	if( angle_b > angle_a )	//?§????????¢????????????????
		return 1;
	return -1;	//?§???????????°?????????????
}

int main()
{
	double x[4], y[4];
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[0], &y[0], &x[1], &y[1], &x[2], &y[2], &x[3], &y[3]))
	{
		//A???B???C, B???C???D, C???D???A?????????????????¨???????????????????????????
		double ang[4];
		
		for( int i = 0; i < 4; i++ )
			ang[i] = atan2(y[(i+1)%4] - y[i%4], x[(i+1)%4] - x[i%4]);
		
		double angType[4];
		for( int i = 0; i < 4; i++ )
			angType[i] = getRotType( ang[i], ang[(i+1)%4] );
		
		int i;
		for( i = 0; i < 3; i++ ){
			if( angType[i] != angType[i+1] )
				break;
		}
		if( i == 3 )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}