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

int main()
{
	const double PI = acos(-1);
	double x[4], y[4];
	char c;

	while (cin >> x[0] >> c >> y[0] >> c >> x[1] >> c >> y[1] >> c
				>> x[2] >> c >> y[2] >> c >> x[3] >> c >> y[3]) {

		bool f = 1;

		for (int i = 0; i < 4; i++) {
			int j = (i + 1) % 4, k = (i + 2) % 4;
			double t = atan2(y[k] - y[j], x[k] - x[j]) - atan2(y[j] - y[i], x[j] - x[i]);

			if (t < -PI)
				t += PI * 2;
			else if (t > PI)
				t -= PI * 2;

			if (!(t >= 0)) {
				f = 0;
				break;
			}
		}

		if (f)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

