#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <cfloat>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <functional>
#include <utility>
#include <numeric>

using namespace std;

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef istringstream ISS;
typedef ostringstream OSS;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )
#define EACH( v, c ) for ( auto &v : c )

#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

typedef pair< double, double > PDD;

double cross( PDD p1, PDD p2 )
{
	return p1.fst * p2.snd - p1.snd * p2.fst;
}

PDD operator - ( PDD p1, PDD p2 )
{
	return MP( p1.fst - p2.fst, p1.snd - p2.snd );
}

int main()
{
	cin.tie( 0 );
	ios::sync_with_stdio( false );

	string line;

	while ( cin >> line )
	{
		REP( i, 0, line.size() )
		{
			if ( line[i] == ',' )
			{
				line[i] = ' ';
			}
		}

		vector< PDD > ps( 4 );

		ISS iss( line );

		REP( i, 0, 4 )
		{
			iss >> ps[i].fst >> ps[i].snd;
		}

		ps.insert( ps.end(), ps.begin(), ps.begin() + 2 );

		int res = 0;

		REP( i, 0, 4 )
		{
			res += cross( ps[i] - ps[ i + 1 ], ps[ i + 1 ] - ps[ i + 2 ] ) < 0 ? -1 : 1;
		}

		if ( abs( res ) == 4 )
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}

	return 0;
}