#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

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

	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		vector <double> x (4, 0. );
		vector <double> y (4, 0. );
		vector <double> vx (4, 0. );
		vector <double> vy (4, 0. );

		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 >> x[i] >> y[i];
		} // end for
		
		for (i = 0; i < 4; ++i){
			vx[i] = x[(i+1) % 4] - x[i];
			vy[i] = y[(i+1) % 4] - y[i];
//			cout << "v[" << i << "]: " << '(' << vx[i] << ',';
//			cout << vy[i] << ')' << endl;
		} // end for
		vector <double> exp (4, 0.);
		for (i = 0; i < 4; ++i){
//			double v2x = x[(i+2) % 4] - x[i];
//			double v2y = y[(i+2) % 4] - y[i];
			double v2x = vx[(i+1) % 4] + vx[i];
			double v2y = vy[(i+1) % 4] + vy[i];
			double v1x = vx[i];
			double v1y = vy[i];
//			cout << "v2" << '(' << v2x << ',' << v2y << ')' << endl;
//			cout << "v1" << '(' << v1x << ',' << v1y << ')' << endl;
			exp[i] = v1x*v2y - v1y*v2x;
//			cout << "inp[" << i << "]: " << inp[i] << endl;
			
//			inp[i] /= sqrt (v1x*v1x + v1y*v1y)*sqrt (v2x*v2x + v2y*v2y);
//			cout << "inp[" << i << "]: " << inp[i] << endl;
		} // end for

		for (i = 0; i < 4; ++i){
			if (exp[i] < 0.){
				break;
			} // end if
		} // end for

		if (i == 4){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if

	} // end while
		
	return 0;
}