#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);
		}
		double gaiseki[4];
		rep(i,4){
			point vec1,vec2;
			vec1.x = ten[(i+1)%4].x - ten[i].x;
			vec1.y = ten[(i+1)%4].y - ten[i].y;
			vec2.x = ten[(i+2)%4].x - ten[(i+1)%4].x;
			vec2.y = ten[(i+2)%4].y - ten[(i+1)%4].y;
			gaiseki[i] = vec1.x*vec2.y - vec1.y*vec2.x;
		}
		bool neg = false;
		rep(i,4){
			if(gaiseki[i]<0)neg=true;
		}
		if(neg)cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	return 0;
}