#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#define int long long
using namespace std;
signed main() {
	string s;
	while (cin >> s) {
		s += ',';
		double d[10]; int p = 0;
		double d1 = 0, l = 1; bool b = 0;
		for (int i = 0; i < s.size(); i++) {
			if (s[i] == ',') {
				d[p] = d1; p++; d1 = 0;
				b = 0; l = 1;
			}
			else if (s[i] == '.') {
				b = 1; l = 0.1;
			}
			else if (!b) { d1 = d1 * 10 + (s[i] - '0'); }
			else { d1 += (s[i] - '0')*l; l /= 10; }
		}
		if (d[4] == d[0]) {
			if ((d[2] - d[0])*(d[0] - d[6]) <= 0) cout << "NO\n";
			else {
				double k = (d[7] - d[3]) / (d[6] / d[2]), p = d[3] - d[2] * k;
				if ((k*d[0] + p - d[1])*(d[5] - (k*d[4] + p)) <= 0)cout << "NO\n";
				else cout << "YES\n";
			}
		}
		else if (d[6] == d[2]) {
			if ((d[0] - d[2])*(d[2] - d[4]) <= 0) cout << "NO\n";
			else {
				double k1 = (d[5] - d[1]) / (d[4] - d[0]), p1 = d[1] - d[0] * k1;
				if ((k1*d[2] + p1 - d[3])*(d[7] - (k1 * d[6] + p1)) <= 0)cout << "NO\n";
				else cout << "YES\n";
			}
		}
		else {
			//01 45 - 23 67
			double k1 = (d[5] - d[1]) / (d[4] - d[0]), k2 = (d[7] - d[3]) / (d[6] / d[2]);
			double p1 = d[1] - d[0] * k1, p2 = d[3] - d[2] * k2;
			if      ((k1*d[2]+p1 - d[3])*(d[7] - (k1*d[6]+p1)) <= 0)cout << "NO\n";
			else if ((k2*d[0]+p2 - d[1])*(d[5] - (k2*d[4]+p2)) <= 0)cout << "NO\n";
			else cout << "YES\n";
		}
	}
}
