#include <iostream>
#include <string>
#include <vector>
#include <stdlib.h>
using namespace std;
struct Point
{
	Point(double _x, double _y) : x(_x), y(_y) {}
	double x;
	double y;
};
typedef Point Vector;
bool isConvex(Point& P1, Point& P2, Point& P3){
	Vector V1(P1.x - P2.x, P1.y - P2.y);
	Vector V2(P3.x - P2.x, P3.y - P2.y);
	return (V1.x * V2.y - V1.y * V2.x) > 0;
}
bool isConvexSquare(Point& P1, Point& P2, Point& P3, Point& P4){
	bool b1 = isConvex(P1, P2, P3);
	bool b2 = isConvex(P2, P3, P4);
	bool b3 = isConvex(P3, P4, P1);
	bool b4 = isConvex(P4, P1, P2);
	return (b1 == b2 && b2 == b3 && b3 == b4 && b4 == b1);
}
vector<double> Split(string& line){
	vector<double> vN(8, 0.0);
	string::size_type p1 = 0;
	string::size_type p2 = line.find(',');
	int i = 0;
	double v;
	while (p1 != string::npos){
		if (p1 == 0) v = atof(line.substr(0, p2).c_str());
		else if (p2 != string::npos)	v= atof(line.substr(p1 + 1, p2 - p1 - 1).c_str());
		else v = atof(line.substr(p1 + 1).c_str());
		vN[i] = v;
		p1 = p2;
		++i;
		if (p1 != string::npos)
			p2 = line.find(',', p1 + 1);
	}
	return vN;
}
void getValue(string& line, double* X, double* Y){
	vector<double> vN = Split(line);
	X[0] = vN[0];
	Y[0] = vN[1];
	X[1] = vN[2];
	Y[1] = vN[3];
	X[2] = vN[4];
	Y[2] = vN[5];
	X[3] = vN[6];
	Y[4] = vN[7];
}
int main()
{
	double X[4] = {}, Y[4] = {};
	string line;
	while (cin >> line){
		getValue(line, X, Y);
		Point P1(X[0], Y[0]);
		Point P2(X[1], Y[1]);
		Point P3(X[2], Y[2]);
		Point P4(X[3], Y[3]);
		if (isConvexSquare(P1, P2, P3, P4)) cout << "YES\n";
		else cout << "NO\n";
	}
	return 0;
}