#include<stdio.h>
int main(){
	double a[8];
	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",a,a+1,a+2,a+3,a+4,a+5,a+6,a+7)){
		bool ok=true;
		if((a[0]-a[2])*(a[4]-a[2])+(a[1]-a[3])*(a[5]-a[3])<0)ok=false;
		if((a[2]-a[4])*(a[6]-a[4])+(a[3]-a[5])*(a[7]-a[5])<0)ok=false;
		if((a[4]-a[6])*(a[0]-a[6])+(a[5]-a[7])*(a[1]-a[7])<0)ok=false;
		if((a[6]-a[0])*(a[2]-a[0])+(a[7]-a[1])*(a[3]-a[1])<0)ok=false;
		printf(ok?"YES\n":"NO\n");
	}
}