#include<iostream>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

struct point{
	double x;
	double y;
};

int main(){
	point ten[4];
	while(cin>>ten[0].x){
		scanf(",%lf",&ten[0].y);
		rep(i,3){
			scanf(",%lf,%lf",&ten[i+1].x,&ten[i+1].y);
		}
		//rep(i,4)cout<<i<<" "<<ten[i].x<<" "<<ten[i].y<<endl;
		double gaiseki[4];
		rep(i,4){
			//cout<<"index ="<<(i+5)%4<<" "<<(i+3)%4<<endl;
			//cout<<"vec["<<i<<"to"<<(i+5)%4<<"] = ("<<ten[(i+5)%4].x-ten[i].x<<","<<ten[(i+5)%4].y-ten[i].y<<")"<<endl;
			//cout<<"vec["<<i<<"to"<<(i+3)%4<<"] = ("<<ten[(i+3)%4].x-ten[i].x<<","<<ten[(i+3)%4].y-ten[i].y<<")"<<endl;
			gaiseki[i]=(ten[(i+5)%4].x-ten[i].x)*(ten[(i+3)%4].y-ten[i].y)+(ten[(i+5)%4].y-ten[i].y)*(ten[(i+3)%4].x-ten[i].x);
		}
		/*rep(i,4){
			cout<<i<<"'s gaiseki ="<<gaiseki[i]<<endl;
		}*/
		bool check1= (gaiseki[0]>0) && (gaiseki[1]<0) && (gaiseki[2]>0) && (gaiseki[3]<0);
		bool check2= (gaiseki[0]<0) && (gaiseki[1]>0) && (gaiseki[2]<0) && (gaiseki[3]>0);
		//cout<<check1<<" "<<check2<<endl;
		if(check1 || check2)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}