#include <iostream>
#include <vector>
#include <complex>
//#include <fstream>	// require freopen

using namespace std;

typedef complex <double> P;

#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)

// OÏ (cross product) : a~b = |a||b|sinÆ
double cross(P a, P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}

int main()
{
//	cut here before submit 
//	freopen("testcase.ic", "r", stdin);
	string str = "";

	while (getline (cin, str ) ){
		while (str.find(',') != string::npos ){
			str = str.replace(str.find(','), 1, " " );
		} // end while

		stringstream ss (str );
		vector <P> p(4);
		int i;

		for (i = 0; i < 4; ++i){
			ss >> p[i].real() >> p[i].imag();
		} // end for

		if ( (    cross (p[1] - p[0], p[2] - p[0] ) > 0.0 
			&& cross (p[2] - p[1], p[3] - p[1] ) > 0.0
			&& cross (p[3] - p[2], p[0] - p[2] ) > 0.0
			&& cross (p[0] - p[3], p[1] - p[3] ) > 0.0
		      )
		||    (
   			   cross (p[1] - p[0], p[2] - p[0] ) < 0.0 
			&& cross (p[2] - p[1], p[3] - p[1] ) < 0.0
			&& cross (p[3] - p[2], p[0] - p[2] ) < 0.0
			&& cross (p[0] - p[3], p[1] - p[3] ) < 0.0
		      )
		){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if

	} // end while
		
	return 0;
}