import java.util.*;class Main{public static void main(String[]z){double[]b=new double[12];for(Scanner s=new Scanner(System.in);s.hasNext();System.out.println(((b[8]=f(b[0],b[1],b[4],b[5],b[6],b[7]))>0&&(b[9]=f(b[4],b[5],b[0],b[1],b[2],b[3]))>0&&(b[10]=f(b[2],b[3],b[6],b[7],b[0],b[1]))>0&&(b[11]=f(b[6],b[7],b[2],b[3],b[4],b[5]))>0)||(b[8]<0&&b[9]<0&&b[10]<0&&b[11]<0)?"YES":"NO")){z=s.next().split(",");for(int i=0;i<8;++i)b[i]=new Double(z[i]);}}static double f(double a,double b,double c,double d,double e,double f){return ((d-b)*e+(a-c)*f+c*b-a*d);}}