#include <stdio.h>

#define EPS 1e-8

int main(void){
	double x1, y1, x2, y2, x3, y3, x4, y4;
	double cp1, cp2, cp3, cp4; // cross product for each angle
	int conv;
	
	while (scanf("%lf,", &x1)!=EOF){
		scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf", &y1, &x2, &y2, &x3, &y3, &x4, &y4);
		conv = 1;
		cp1 = (x2-x1)*(x1-x4) - (y2-y1)*(y1-y4);
		cp2 = (x3-x2)*(x2-x1) - (y3-y2)*(y2-y1);
		cp3 = (x4-x3)*(x3-x2) - (y4-y3)*(y3-y2);
		cp4 = (x1-x4)*(x4-x3) - (y1-y4)*(y4-y3);
		//printf("%f\t%f\t%f\t%f\n", cp1, cp2, cp3, cp4);
		
		if (cp1 * cp2 < -EPS) conv = 0;
		if (cp2 * cp3 < -EPS) conv = 0;
		if (cp3 * cp4 < -EPS) conv = 0;
		if (cp4 * cp1 < -EPS) conv = 0;
		puts(conv?"YES":"NO");
	}
	
	return 0;
}
	