#include <cstdio>
#include <iostream>
using namespace std;

#define scanf scanf_s

struct p {
	double x;
	double y;
};

int check(struct p a,struct p b,struct p c,struct p d) {
	if (((a.x-b.x)*(c.y-a.y)+(a.y-b.y)*(a.x-c.x)) *
		((a.x-b.x)*(d.y-a.y)+(a.y-b.y)+(a.x-d.x))) {
		return 1;
	}
	return 0;
}

int main() {
	double x1, x2, x3, x4, y1, y2, y3, y4;
	while (scanf("%f,%f,%f,%f,%f,%f,%f,%f",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF) {
		p a, b, c, d;
		a.x = x1, a.y = y1;
		b.x = x2, b.y = y2;
		c.x = x3, c.y = y3;
		d.x = x4, d.y = y4;

		if (check(a,c,b,d) && check(b,d,a,c)) {
			cout << "NO";
		}else {
			cout << "YES";
		}
		cout << endl;
	}
	return 0;
}