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

int main()
{
	const double PI = 3.14159265358979;
	double x[4], y[4];
	complex<double> z[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]) {

		for (int i = 0; i < 4; i++) {
			z[i].real(x[i]);
			z[i].imag(y[i]);
		}

		bool f = 1;

		for (int i = 0; i < 4; i++) {
			int j = (i + 1) % 4, k = (i + 2) % 4;
			double t = arg((z[k] - z[j]) / (z[j] - z[i]));
			if (!(t > 0 && t < PI)) {
				f = 0;
				break;
			}
		}

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

	return 0;
}
