#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

double cross (double x1, double y1, double x2, double y2 )
{
	return (x1*y2 - x2*y1 );
}

int main()
{
//	cut here before submit 
//	freopen ("testcase.convex", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		while (str.find(',') != string::npos ){
			str = str.replace(str.find(','), 1, " ");
		} // end while
		stringstream ss(str);
		vector<double> x(4, 0.0 ), y (4, 0.0 );
		rep (i, 4 ){
			ss >> x[i] >> y[i];
		} // end rep

		vector<double> res (4, 0 );
		rep (i, 4 ){
			res[i] = cross (	x[(i+2)%4] - x[i], y[(i+2)%4] - y[i],
								x[(i+1)%4] - x[i], y[(i+1)%4] - y[i] );
		} // end rep
		int pl = 0, ng = 0; 
		rep (i, 4 ){
			if (res[i] > 0. ) pl++;
			else
				ng++;
		} // end rep
		if (pl == 4 || ng == 4 ){
			printf ("YES\n" );
		}else{
			printf ("NO\n" );
		} // end if
	} // end loop

//	printf ("%d\n", res );
		
	return 0;
}