public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			String[] s = sc.next().split(",");
			Point[] p = new Point[4];
			for(int i=0;i<4;i++)p[i]=new Point(Double.parseDouble(s[i*2]),Double.parseDouble(s[i*2+1]));
			boolean l = true;
			boolean r = true;
			for(int i=0;i<4;i++){
				double dx = p[(i+1)%4].x-p[i].x;
				double dy = p[(i+1)%4].y-p[i].y;
				for(int j=0;j<4;j++){
					if(j==i||j==(i+1)%4)continue;
					double dx2 = p[j].x-p[i].x;
					double dy2 = p[j].y-p[i].y;
					double ex = extp(new Point(dx, dy), new Point(dx2, dy2));
					if(ex>0)r=false;
					else l=false;
				}
			}
			System.out.println(l||r?"YES":"NO");
		}
	}