#include <stdio.h>
#include <math.h>

#define PI (3.14159265358979)
#define  rad2deg(_a) ((_a) / PI * 180.0)

int
main(void)
{
	char line[80];

	double xa, ya, xb, yb, xc, yc, xd, yd;

	while (true) {
		if (fgets(line, sizeof line, stdin) == NULL) {
			break;
		}
		if (sscanf(line, "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,",
				   &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != 8) {
			break;
		}

		double ab = sqrt(pow(xa-xb, 2) + pow(ya-yb, 2));
		double bc = sqrt(pow(xb-xc, 2) + pow(yb-yc, 2));

		double ac = sqrt(pow(xa-xc, 2) + pow(ya-yc, 2));

		double cd = sqrt(pow(xc-xd, 2) + pow(yc-yd, 2));
		double ad = sqrt(pow(xa-xd, 2) + pow(ya-yd, 2));

		double A0 = rad2deg(acos((ab*ab + ac*ac - bc*bc)/ (2*ab*ac)));
		double B  = rad2deg(acos((ab*ab + bc*bc - ac*ac)/ (2*ab*bc)));
		double C0 = rad2deg(acos((ac*ac + bc*bc - ab*ab)/ (2*ac*bc)));

		double A1 = rad2deg(acos((ad*ad + ac*ac - cd*cd)/ (2*ad*ac)));
		double C1 = rad2deg(acos((ac*ac + cd*cd - ad*ad)/ (2*ac*cd)));
		double D  = rad2deg(acos((ad*ad + cd*cd - ac*ac)/ (2*ad*cd)));

		if ((A0+A1) > 180 || B > 180 || (C0+C1) > 180 || D > 180) {
			printf("NO\n");
		} else {
			printf("YES\n");
		}
	}

	return 0;
}