typedef float f;i;f x,y,z[];f o(f*a,f*b,f*c){y=a[1]*(*c-*b)+c[1]*(*b-*a)+b[1]*(*a-*c);}main(){for(;~scanf("%f,",z+i++%8);)i%8||puts(x*o(z+2,z+4,z+6)>0&x*o(z+4,z+6,z)>0&x*o(z+6,z,z+2)>0?"YES":"NO",x=o(z,z+2,z+4));}