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

double cross(point a,point b){
	return imag(conj(a)*b);
}

int main(){
	double x,y;
	point in[4],p[4];
	while(scanf("%lf,%lf,",&x,&y)!=EOF){	
		loop(i,1,4){
			if(i!=3)scanf("%lf,%lf,",&x,&y);
			else scanf("%lf,%lf",&x,&y);
			in[i]=point(x,y);
		}
		rep(i,4)p[i]=in[(i+1)%4]-in[i];
		bool check[4];
		rep(i,4)check[i]=(cross(p[i],p[(i+1)%4])>0)?true:false;
		if((check[0]&check[1]&check[2]&check[3])||(!check[0]&!check[1]&!check[2]&!check[3]))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}