#define P(o,a,b)((x[a]-x[o])*(y[b]-y[o])-(y[a]-y[o])*(x[b]-x[o]))
float x[5],y[5];main(i){for(;~scanf("%f,%f,",x+i,y+i);)++i-5||puts(P(1,2,3)*P(2,3,4)>0&&P(2,3,4)*P(3,4,1)>0&&P(3,4,1)*P(4,1,2)>0?"YES ":"NO ",i=1);}