#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>

using namespace std;

double EPS = 1e-12;

//誤差を考慮して足し算を行う
double add(double a, double b) {
	if( abs(a + b) < EPS * (abs(a) + abs(b))) {
		return 0;
	}

	return a + b;
}

//二次元ベクトル構造体
struct P {
	double x, y;

	P() {};
	P(double x, double y) : x(x), y(y) {
	}
	P operator + (P p) {
		return P(add(x, p.x), add(y, p.y));
	}
	P operator - (P p) {
		return P(add(x, -p.x), add(y, -p.y));
	}
	P operator * (double d) {
		return P(x * d, y * d);
	}
	double dot(P p) {	//　内積
		return add(x * p.x, y * p.y);
	}
	double det(P p) {	//　外積
		return add(x * p.y, -y * p.x);
	}
};

//　線分p1-p2上に点qがあるか判定
bool on_seg(P p1, P p2, P q) {
		return (p1 - q).det(p2 - q) == 0 && (p1 - q).dot(p2 - q) <= 0;
}

//　直線p1-p2と直線q1-q2の交点
P intersection(P p1, P p2, P q1, P q2) {
	return p1 + (p2 - p1) * ((q2 - q1).det(q1 - p1) / (q2 - q1).det(p2 - p1));
}

int ccw(P a, P b, P c) {
	a = b - a;
	b = b - c;

	if(a.det(b) < 0) {
		return -1;
	} else if(a.det(b) > 0) {
		return 1;
	}

	return 0;
}


int main() {

	P a, b, c, d;
	char dummy;

	while ( cin >> a.x >> dummy >> a.y >> dummy >> b.x >> dummy >> dummy >> b.y >> dummy >> c.x >> dummy >> c.y >> dummy >> d.x >> dummy >> d.y ) {
		int cnt, ans = 0, count = 0;

		cnt = ccw(a, b, c);
		ans += abs(cnt);
		count += cnt;
		cnt = ccw(b, c, d);
		ans += abs(cnt);
		count += cnt;
		cnt = ccw(c, d, a);
		ans += abs(cnt);
		count += cnt;
		cnt = ccw(d, a, b);
		ans += abs(cnt);
		count += cnt;

		if(abs(count) == ans) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
}