#include<cstdio>
main(){
double a,A,b,B,c,C,d,D,v,V,w,W,x,X,y,Y;
for(;~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a,&A,&b,&B,&c,&C,&d,&D);){
v=b-a;V=B-A;
w=c-b;W=C-B;
x=d-c;X=D-C;
y=a-d;Y=A-D;
puts(v*W-V*w>0&&w*X-W*x>0&&x*Y-X*y>0&&y*V-Y*v>0?"YES":"NO");
}}