#include<iostream>

using namespace std;

typedef struct{
	double x,y;
}Point_obj;

class Vector_obj{
private:
	double x,y;
public:
	void set(Point_obj *p0,Point_obj *p1){
		x = p1->x - p0->x;
		y = p1->y - p0->y;
	}
	void print(){
		cout<<x<<" "<<y<<endl;
	}
	double GetX(){return x;}
	double GetY(){return y;}
};

double exteriorProduct(Vector_obj *v0,Vector_obj *v1){
	return v0->GetX() * v1->GetY() - v0->GetY() * v1->GetX();
}


int main(){

	Point_obj point[4];
	Vector_obj Vector[8];
	char tmp;

	while(cin>>point[0].x){
		cin>>tmp;
		cin>>point[0].y;
		cin>>tmp;

		for(int i=1;i<4;i++){
			cin>>point[i].x;
			cin>>tmp;
			cin>>point[i].y;
			if(i!=3){
				cin>>tmp;
			}
		}

		for(int i=0;i<8;i+=2){
			Vector[i].set(&point[i/2],&point[(i/2+1)%4]);
			//Vector[i].print();
			Vector[i+1].set(&point[i/2],&point[(i/2+2)%4]);
			//Vector[i+1].print();
		}

		double tmp;
		
		tmp = exteriorProduct(&Vector[0],&Vector[1]);

		if(tmp >= 0){
			if( exteriorProduct(&Vector[2],&Vector[3]) >= 0 && exteriorProduct(&Vector[4],&Vector[5]) >= 0
				&& exteriorProduct(&Vector[6],&Vector[7]) >= 0){
					cout<<"YES"<<endl;
			}
			else{
				cout<<"NO"<<endl;
			}
		}
		else{
			if( exteriorProduct(&Vector[2],&Vector[3]) < 0 && exteriorProduct(&Vector[4],&Vector[5]) < 0
				&& exteriorProduct(&Vector[6],&Vector[7]) < 0){
					cout<<"YES"<<endl;
			}
			else{
				cout<<"NO"<<endl;
			}

		}

	}

	return 0;
}