#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

struct Vector2D{
	double x;
	double y;
};

double gaiseki(Vector2D* a , Vector2D* b){
	return (a->x)*(b->y)-(a->y)*(b->x);
}

int main(){
	double xa,ya,xb,yb,xc,yc,xd,yd;
	char c;
	while(cin>>xa>>c>>ya>>c>>xb>>c>>yb>>c>>xc>>c>>yc>>c>>xd>>c>>yd){
		Vector2D ab ,ad , bc , ba , ca , cb , cd , ac , da , bd , dc , db;
		ab.x=xb-xa;
		ab.y=yb-ya;
		ad.x=xd-xa;
		ad.y=yd-ya;
		bc.x=xc-xb;
		bc.y=yc-yb;
		bd.x=xd-xb;
		bd.y=yd-yb;
		ba.x=xa-xb;
		ba.y=ya-yb;
		ca.x=xa-xc;
		ca.y=ya-yc;
		cb.x=xb-xc;
		cb.y=yb-yc;
		cd.x=xd-xc;
		cd.y=yd-yc;
		ac.x=xc-xa;
		ac.y=yc-ya;
		da.x=xa-xd;
		da.y=ya-yd;
		bd.x=xd-xb;
		bd.y=yd-yb;
		db.x=xb-xd;
		db.y=yb-yd;
		dc.x=xc-xd;
		dc.y=yc-yd;
		double abac , bdbc , dadc;
		double abad , bcbd , cacd;
		double bcba , cdca , dbda;
		double cdcb , dadb , acab;
		abac=gaiseki(&ab , &ac);
		bdbc=gaiseki(&bd , &bc);
		dadc=gaiseki(&da , &dc);
		abad=gaiseki(&ab , &ad);
		bcbd=gaiseki(&bc , &bd);
		cacd=gaiseki(&ca , &cd);
		bcba=gaiseki(&bc , &ba);
		cdca=gaiseki(&cd , &ca);
		dbda=gaiseki(&db , &da);
		cdcb=gaiseki(&cd , &cb);
		dadb=gaiseki(&da , &db);
		acab=gaiseki(&ac , &ab);
		if((abac<0 && bdbc<0 && dadc<0)||(abac>0 && bdbc>0 && dadc>0 )) cout << "NO" << endl;
		else if((abad<0 && bcbd<0 && cacd<0) || (abad>0 && bcbd>0 && cacd>0)) cout << "NO" << endl;
		else if((bcba<0 && cdca<0 && dbda<0) || (bcba>0 && cdca>0 && dbda>0)) cout << "NO" << endl;
		else if((cdcb<0 && dadb<0 && acab<0) || (cdcb>0 && dadb>0 && acab>0)) cout << "NO" << endl;
		else cout << "YES" << endl;
	}
	return 0; 
}