#include<iostream>
#include<vector>

class Coord{
public:
	const double x, y;
	
	Coord(double x, double y):x(x), y(y){}
	Coord(const Coord& c):x(c.x),y(c.y){}
	
	Coord operator-(const Coord& rhs) const{
		/*Coord temp;
		temp.x = this->x - rhs.x;
		temp.y = this->y - rhs.y;*/
		Coord temp(this->x - rhs.x, this->y - rhs.y);
		return temp;
	}
	/*
	Coord& operator=(const Coord& rhs){
		this->x = rhs.x;
		this->y = rhs.y;
		return *this;
	}
	*/
};

typedef Coord Vector2D;

class Square{
	std::vector<Coord*> points;

public:
	Square(double xa, double ya, double xb, double yb, double xc, double yc, double xd, double yd){
		points.push_back(new Coord(xa, ya));
		points.push_back(new Coord(xb, yb));
		points.push_back(new Coord(xc, yc));
		points.push_back(new Coord(xd, yd));
	}
	bool isInTriangle(Coord* A, Coord* B, Coord* C, Coord* P){
	// 点と三角形の当たり判定( 内外判定 )
	// http://www.sousakuba.com/Programming/gs_hittest_point_triangle.html
	
		Vector2D AB(*B - *A);
		Vector2D BP(*P - *B);
		
		Vector2D BC(*C - *B);
		Vector2D CP(*P - *C);
		
		Vector2D CA(*A - *C);
		Vector2D AP(*P - *A);
		
		//外積    Z成分だけ計算すればよいです
		double c1 = AB.x * BP.y - AB.y * BP.x;
		double c2 = BC.x * CP.y - BC.y * CP.x;
		double c3 = CA.x * AP.y - CA.y * AP.x;
		
		if( ( c1 > 0 && c2 > 0 && c3 > 0 ) || ( c1 < 0 && c2 < 0 && c3 < 0 ) ) {
		    //三角形の内側に点がある
		    return true;
		}
		
		//三角形の外側に点がある
		return false;
	}
	bool isConvex(void){
		for(int i=0; i<points.size(); i++){
			std::vector<Coord*> triangle;
			for(int j=0; j<points.size(); j++){
				if(j != i){
					triangle.push_back(points[j]);
				}
			}
			if( isInTriangle(triangle[0], triangle[1], triangle[2], points[i]) ){
				return true;
			}
		}
		return false;
	}
};

int main(void){
	double xa, ya, xb, yb, xc, yc, xd, yd;
	char c;//cammma
	while (std::cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >> c >> xd >> c >> yd) {
		Square* s = new Square(xa, ya, xb, yb, xc, yc, xd, yd);
		if( s->isConvex() ){
			std::cout << "NO" << std::endl;//凹みがあれば NO
		}else{
			std::cout << "YES" << std::endl;//凹みがなければ YES
		}
	}
	
	return 0;
}

