double gaiseki(double x0,double y0,double x1,double y1,double x2,double y2){
  return(x1-x0)*(y2-y0)-(x2-x0)*(y1-y0);
}
int main(){
  double x0,y0,x1,y1,x2,y2,x3,y3;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){
    if((x1-x0)*(y3-y0)-(x3-x0)*(y1-y0)>0){
      if((x1-x0)*(y3-y0)-(x3-x0)*(y1-y0)<=0||(x3-x2)*(y1-y2)-(x1-x2)*(y3-y2)<=0||(x0-x3)*(y2-y3)-(x2-x3)*(y0-y3)<=0){
	printf("NO\n");
      }else{
	printf("YES\n");
      }
    }else  if((x1-x0)*(y3-y0)-(x3-x0)*(y1-y0)<0){
      if((x1-x0)*(y3-y0)-(x3-x0)*(y1-y0)>=0||(x3-x2)*(y1-y2)-(x1-x2)*(y3-y2)>=0||(x0-x3)*(y2-y3)-(x2-x3)*(y0-y3)>=0){
	printf("NO\n");
      }else{
	printf("YES\n");
      }
    }else{
      printf("NO\n");
    }
  }
  return 0;
}