#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>
#include <map>
#include <cstdio>
#include <utility>

using namespace std;
typedef pair<double,double> P;

int main(){
	double xa = 0,ya = 0,xb = 0,yb = 0,xc = 0,yc = 0,xd = 0,yd = 0;
	//cout << "OK" << endl;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd) != EOF){
		double a = 0, b = 0, c = 0, d = 0;
		//cout << xa << " " << ya << " " << xb << " " << yb << endl;
		P AB, BC, CD, DA;
		AB.first = xb - xa;
		AB.second = yb - ya;
		//cout << AD.first << " " << AD.second << endl;
		BC.first = xc - xb;
		BC.second = yc - yb;
		a = AB.first*BC.second + (-1)*AB.second*BC.first;
		//cout << a << endl;
		//cout << AB.first << " " << AB.second << endl;
		//cout << BC.first << " " << BC.second << endl;
		CD.first = xd - xc;
		CD.second = yd - yc;
		//cout << CD.first << " " << CD.second << endl;
		b = BC.first*CD.second + (-1)*BC.second*CD.first;

		DA.first = xa - xd;
		DA.second = ya - yd;
		//cout << DA.first << " " << DA.second << endl;
		c = CD.first*DA.second + (-1)*CD.second*DA.first;
		//cout << a << b << d << endl;

		d = DA.first*AB.second + (-1)*DA.second*AB.first;

		//cout << a << b << c << d << endl;

		if((a >= 0 && b >= 0 && c >= 0 && d >= 0) || (a < 0 && b < 0 && c < 0 && d < 0)) cout << "YES" << endl;
		else cout << "NO" << endl;

	}
	return 0;
}