#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);
	vector <P> p(4);
	string str = "";

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

		for (i = 0; i < 4; ++i){
			ss >> p[i].real() >> p[i].imag();
		} // end for
		
		for (i = 0; i < 4; ++i){
			if ( cross (p[(i+1) % 4] - p[i], p[(i+2) % 4] - p[i] ) > 0.0 ){
				continue;
			}else{
				break;
			} // end if
		} // end for
		if (i == 4){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if
	} // end while
		
	return 0;
}