#include <iostream>
#include <cstdio>
#include <stdio.h>
#include <math.h>
using namespace std;
int line(double x1,double y1,double x2,double y2,double xp,double yp){
	if(x1!=x2){
		y1=(y2-y1)*(xp-x1)/(x2-x1)+y1;
	}
	if(yp>y1) return 1;
	else return -1;
}
int main(){
	double xa,ya,xb,yb,xc,yc,xd,yd;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){
		int a,b,c,d;
		a=line(xb,yb,xd,yd,xa,ya);
		b=line(xa,ya,xc,yc,xb,yb);
		c=line(xb,yb,xd,yd,xc,yc);
		d=line(xa,ya,xc,yc,xd,yd);
		if(a+c==0 && b+d==0){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}