#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;

double area(double a, double b, double c)
{
	double s = (a+b+c)/2;
	return sqrt(s*(s-a)*(s-b)*(s-c));
}
double distance(double x1, double y1, double x2, double y2)
{
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
bool isInTriangle(double x[3], double y[3], double xp, double yp)
{
	double edge[3];
	for (int i = 0; i < 3; ++i)
		edge[i] = distance(x[i], y[i], x[(i+1)%3], y[(i+1)%3]);
	double correctArea = area(edge[0], edge[1], edge[2]);
	double totalArea = 0;
	for (int i = 0; i < 3; ++i)
	{
		totalArea += area(distance(x[i], y[i], xp, yp)
			, distance(x[(i+1)%3], y[(i+1)%3], xp, yp), edge[i]);
	}
	return abs(correctArea - totalArea) < 0.0001;
}

int main()
{
	double x[4], y[4];
	while (true)
	{
		for (int i = 0; i < 3; ++i)
			scanf("%lf,%lf,", x+i, y+i);
		if (scanf("%lf,%lf", x+3, y+3) == EOF)
			break;

		bool isConvace = false;
		for (int i = 0; i < 4; ++i)
		{
			double xp = x[i];
			double yp = y[i];
			double tx[3], ty[3];
			for (int j = 0; j < 3; ++j)
			{
				tx[j] = x[(i+j+1)%4];
				ty[j] = y[(i+j+1)%4];
			}
			isConvace |= isInTriangle(tx, ty, xp, yp);
		}
		if (isConvace)
			puts("NO");
		else
			puts("YES");
	}

	return 0;
}