#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,y;
};

double op(point a,point b){
	return a.x*b.y-a.y*b.x;
}

int main(){
	point p[4];
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&p[0].x,&p[0].y,&p[1].x,&p[1].y,&p[2].x,&p[2].y,&p[3].x,&p[3].y)!=EOF){
		point vec[4];
		rep(i,4){
			vec[i].x=p[(i+1)%4].x-p[i].x;
			vec[i].y=p[(i+1)%4].y-p[i].y;
		}
		int check=0;
		rep(i,4){
			if(op(vec[i],vec[i+1])>0){
				check++;
			}
		}
		if(check==4 || check==0){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}