#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<cstdlib>

const double EPS = 1e-10;

double add( double x, double y )
{
	if( abs( x + y ) < EPS * ( abs( x ) + abs( y ) ) )
		return 0;

	return x + y;
}

struct P
{
	double x, y;

	P()
	:	x( 0 ), y( 0 )
	{}

	P( double x, double y )
	:	x( x ), y( y )
	{}

	P operator+ ( const P& p ) const
	{
		return P( add( x, p.x ), add( y, p.y ) );
	}

	P operator- ( const P& p ) const
	{
		return P( add( x, -p.x ), add( y, -p.y ) );
	}

	P operator* ( double d ) const
	{
		return P( x * d, y * d );
	}

	double dot( const P& p ) const
	{
		return x * p.x + y * p.y;
	}

	double cross( const P& p ) const
	{
		return x * p.y - y * p.x;
	}

	double norm() const
	{
		return x * x + y * y;
	}
};

int ccw( P& a, P& b, P& c )
{
	b = b - a; c = c - a;

	if( b.cross( c ) > 0 )
		return 1;	// counter clockwise
	else if( b.cross( c ) < 0 )
		return -1;	// clockwise
	else if( b.dot( c ) < 0 )
		return 2;	// c-a-b
	else if( b.norm() < c.norm() )
		return -2;	// a-b-c
}

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] ) != EOF )
	{
		int cw;
		bool f = true;

		for( int i = 0; i != 4; ++i )
		{
			P p( x[i], y[i] ), q( x[( i + 1 ) % 4], y[( i + 1 ) % 4] ), r( x[( i + 2 ) % 4], y[( i + 2 ) % 4] );
			
			int t = ccw( p, q, r );

			if( !i )
				cw = t;

			if( t != cw )
			{
				f = false;
				break;
			}
		}

		if( f )
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}

	return 0;
}