/*
AizuOnline A0035
Is it convex?
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
//#include <string.h>
#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
float xa,xb,xc,xd,ya,yb,yc,yd;
//LINE AC
eq_of_line(float x,float y)
{
  return((x - xa)/(y - ya)-(xc - xa)/(yc - ya));
}
//LINE BD
eq_of_line2(float x,float y)
{
  return((x - xd)/(y - yd)-(xb - xd)/(yb - yd));
}

main()
{
  int f1,f2;

  while(EOF != scanf("%f,%f,%f,%f,%f,%f,%f,%f",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd))
    {
      if(ya == yc)
	f1 = ((yc - ya)*(yd - ya)>0)?1:0;
      else
	f1 = (eq_of_line(xb,yb)*eq_of_line(xd,yd))?1:0;
      
      if(yb == yd)
	f2 = ((ya - yc)*(yb - yc)>0)?1:0;
      else
	f2 = (eq_of_line2(xa,ya)*eq_of_line2(xc,yc))?1:0;
      
      if(f1 || f2)
	printf("YES\n");
      else
	printf("NO\n");
    }





return(0);
}