#include<math.h>

int main(){
	double xa,ya,xb,yb,xc,yc,xd,yd;
	
	while(0<=scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yb,&xd,&yd)){
		
	if(xc==xa){
	if((xd-xc)*(xb-xc)>0){
		printf("NO\n");
		continue;
		}else{
			printf("YES\n");
			continue;
		}
		}
		if(xb==xd){
			if((xa-xb)*(xc-xb)>0){
		printf("NO\n");
		continue;
		}else{
			printf("YES\n");
			continue;
		}
		}
	if((yb-(yc-ya)/(xc-xa)*(xb-xa)-ya)*(yd-(yc-ya)/(xc-xa)*(xd-xa)-ya)>0 || (ya-(yd-yb)/(xd-xb)*(xa-xb)-yb)*(yc-(yd-yb)/(xd-xb)*(xc-xb)-yb)>0){
		printf("NO\n");
		}else{
			printf("YES\n");
		}
		}
	return 0;
		}