import java.util.*;class Main{public static void main(String[]z){new Main();}Main(){for(Scanner s=new Scanner(System.in).useDelimiter("[,\\s]+");s.hasNext();){int i=4,r=1;for(double[]a={s.nextFloat(),s.nextFloat()},b={s.nextFloat(),s.nextFloat()},c={s.nextFloat(),s.nextFloat()},d={s.nextFloat(),s.nextFloat()},x=f(a,b),y=f(b,c),u=f(c,d),v=f(d,a),t={g(x,y),g(y,u),g(u,v),g(v,x)};i-->1;)if(t[0]!=t[i])r=0;System.out.println(r>0?"YES":"NO");}}double[] f(double[]a,double[]b){return new double[]{b[0]-a[0],b[1]-a[1]};}double g(double[]a, double[]b){return Math.signum(prod(a,b)/(Math.sqrt(prod(a,a))*Math.sqrt(prod(b,b))));}double prod(double[]a,double[]b){return a[0]*b[0]+a[1]*b[1];}}