#include <bits/stdc++.h>  
 
using namespace std;
 
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

struct Vector { double x; double y; };

Vector sub_vector(const Vector& a, const Vector& b) {
	Vector ret;
	ret.x = a.x - b.x;
	ret.y = a.y - b.y;
	return ret;
}

int main() {
	double ax, ay, bx, by, cx, cy, dx, dy;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &ax,&ay,&bx,&by,&cx,&cy,&dx,&dy) != EOF) {
		Vector A, B, C, D;
		A.x = ax; A.y = ay;
		B.x = bx; B.y = by;
		C.x = cx; C.y = cy;
		D.x = dx; D.y = dy;

		Vector AB = sub_vector(B, A);
		Vector BD = sub_vector(D, B);
		Vector BC = sub_vector(C, B);
		Vector CD = sub_vector(D, C);
		Vector CA = sub_vector(A, C);
		Vector AD = sub_vector(D, A);

		double c1 = AB.x * BD.y - AB.y * BD.x;
		double c2 = BC.x * CD.y - BC.y * CD.x;
		double c3 = CA.x * AD.y - CA.y * AD.x;

		if((c1 > 0 && c2 > 0 && c3 > 0) || (c1 < 0 && c2 < 0 && c3 < 0)) printf("NO\n");
		else {
			Vector DA = sub_vector(A, D);
			Vector AC = sub_vector(C, A);
			Vector DC = sub_vector(C, D);
			c1 = AB.x * BC.y - AB.y * BC.x;
			c2 = BD.x * DC.y - BD.y * DC.x;
			c3 = DA.x * AC.y - DA.y * AC.x;
			if((c1 > 0 && c2 > 0 && c3 > 0) || (c1 < 0 && c2 < 0 && c3 < 0)) printf("NO\n");
			else {
				Vector AC = sub_vector(C, A);
				Vector CB = sub_vector(B, C);
				Vector DB = sub_vector(B, D);
				c1 = AC.x * CB.y - AC.y * CB.x;
				c2 = CD.x * DB.y - CD.y * DB.x;
				c3 = DA.x * AB.y - DA.y * AB.x;
				if((c1 > 0 && c2 > 0 && c3 > 0) || (c1 < 0 && c2 < 0 && c3 < 0)) printf("NO\n");
				else {
					Vector BA = sub_vector(A, B);
					c1 = BC.x * CA.y - BC.y * CA.x;
					c2 = CD.x * DA.y - CD.y * DA.x;
					c3 = DB.x * BA.y - DB.y * BA.x;
					if((c1 > 0 && c2 > 0 && c3 > 0) || (c1 < 0 && c2 < 0 && c3 < 0)) printf("NO\n");
					else printf("YES\n");
				}
			}
		}
	}
	return 0;
}