#include <bits/stdc++.h>
using namespace std;

double eps = 1e-10;

class Point {
public:
	double x, y;
	
	Point(double x = 0, double y = 0) : x(x), y(y) {}
	
	Point operator + (const Point& p) {
		return Point(x + p.x, y + p.y);
	}
	Point operator - (const Point& p) {
		return Point(x - p.x, y - p.y);
	}
	Point operator * (const double& a) {
		return Point(x * a, y * a);
	}
	Point operator / (const double& a) {
		return Point(x / a, y / a);
	}
	
	bool operator < (const Point& p) const {
		return x != p.x ? x < p.x : y < p.y;
	}
	bool operator == (const Point& p) const {
		return fabs(x - p.x) < eps && fabs(y - p.y) < eps;
	}
	
	double abs() {
		return sqrt(norm());
	}
	double norm() {
		return x * x + y * y;
	}
	
};

class Circle {
public:
	Point c;
	double r;
	Circle(Point c = Point(), double r = 0.0) : c(c), r(r) {}
};

typedef Point Vector;

struct Segment {
	Point p1, p2;
	Segment(Point p1, Point p2) : p1(p1), p2(p2) {}
};

typedef Segment Line;

// ????????????
bool equals(const double& a, const double& b) {
	return fabs(a - b) < eps;
}

// ??????
double dot(const Vector& a, const Vector& b){
	return a.x * b.x + a.y * b.y;	
}

// ??????
double cross(const Vector& a, const Vector& b){
	return a.x * b.y - a.y * b.x;
}

class Triangle {
public:
	Point p1, p2, p3; // ??????
	Vector v1, v2, v3; // ??????????????????
	double e1, e2, e3; // ????????§??????
	double a1, a2, a3; // ?§????(????????¢???)
	
	Triangle(Point a, Point b, Point c) : p1(a), p2(b), p3(c) {
		v1 = p3 - p2; v2 = p3 - p1; v3 = p2 - p1;
		e1 = v1.abs(); e2 = v2.abs(); e3 = v3.abs();
		a1 = law_of_cosines(e1, e2, e3); a2 = law_of_cosines(e2, e1, e3);
		a3 = law_of_cosines(e3, e2, e1);
	}
	
	// ????????????(?????????:?§????)
	double law_of_cosines(const double& a, const double& b, const double& c) { 
		return acos((b * b + c * c - a * a) / (2.0 * b * c)) * 180 / M_PI;
	}
	
	// ?????\????????????
	double calc_radius_circumcenter() {
		return e1 / (2.0 * sin(a1));
	}
	// ?????????????????????
	Vector calc_vec_circumcenter() {
		return (v1 * sin(2.0 * a1) + v2 * sin(2.0 * a2) + v3 * sin(2.0 * a3))
		       / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3));
	}
	
	// ???????????§?¨?
	Point calc_p_circumcenter() {
		return Point((p1.x * sin(2.0 * a1) + p2.x * sin(2.0 * a2) + p3.x * sin(2.0 * a3))
		             / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3)),
		             (p1.y * sin(2.0 * a1) + p2.y * sin(2.0 * a2) + p3.y * sin(2.0 * a3))
		             / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3)));
	}
};

int main() {
	double x1, x2, x3, x4, y1, y2, y3, y4;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4) != EOF){
		Triangle t1 = Triangle(Point(x1, y1), Point(x2, y2), Point(x4, y4));
		Triangle t2 = Triangle(Point(x2, y2), Point(x1, y1), Point(x3, y3));
		Triangle t3 = Triangle(Point(x3, y3), Point(x2, y2), Point(x4, y4));
		Triangle t4 = Triangle(Point(x4, y4), Point(x3, y3), Point(x1, y1));
		//cout << t1.a1 << " " << t2.a1 << " " << t3.a1 << " " << t4.a1 << endl;
		double maxt = max(t1.a1, max(t2.a1, max(t3.a1, t4.a1)));
		if(fabs(maxt - (t1.a1 + t2.a1 + t3.a1 + t4.a1 - maxt)) < eps)
			cout << "NO" << endl;
		else
			cout << "YES" << endl;
	}
	return 0;
}

Measured memory_bytes: 1264