#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;

//三角形面積（三点から）
double smen(double x1, double y1, double x2, double y2, double x3, double y3){
	return abs((x3-x2) * (y1-y2) - (x1-x2)*(y3-y2) )* 0.5;
	
}


int main(void){

int x[4] ,y[4];
char c;

	while(scanf("%f,%f,%f,%f,%f,%f,%f,%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3])){
//cin >> x[0]>>c>>y[0]>>c>>x[1]>>c>>y[1]>>c>>x[2]>>c>>y[2]>>c>>x[3]>>c>>y[3];
		 
		double s1 = smen(x[0],y[0],x[1],y[1],x[2],y[2])
					+ smen(x[2],y[2],x[3],y[3],x[0],y[0]);
		double s2 = smen(x[0],y[0],x[1],y[1],x[3],y[3])
					+ smen(x[2],y[2],x[1],y[1],x[3],y[3]);
		cout << ((s1==s2)? "YES":"NO") << endl;
//		cin.clear();

	}
	return 0;
	
	
}