#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, d = 0;
		//cout << xa << " " << ya << " " << xb << " " << yb << endl;
		P AD, AC, DB, DC, BA, BC;
		//cout << AD.first << " " << AD.second << endl;
		AD.first = xd - xa;
		AD.second = yd - ya;
		//cout << AD.first << " " << AD.second << endl;
		AC.first = xc - xa;
		AC.second = yc - ya;
		a = AD.second*AC.first - AD.first*AC.second;
		//cout << a << endl;

		DB.first = xb - xd;
		DB.second = yb - yd;
		DC.first = xc - xd;
		DC.second = yc - yd;
		d = DB.second*DC.first - DB.first*DC.second;

		BA.first = xa - xb;
		BA.second = ya - yb;
		BC.first = xc - xb;
		BC.second = yc - yb;
		b = BA.second*BC.first - BA.first*BC.second;
		//cout << a << b << d << endl;

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

	}
	return 0;
}