#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

int isConvex(double ax, double ay, double ox, double oy, double bx, double by){
	double x1 = ax - ox;
	double y1 = ay - oy;
	double x2 = bx - ox;
	double y2 = by - oy;
	double angle;
	
	angle = (x1*x2+y1*y2) / (sqrt(x1*x1+y1*y1)*sqrt(x2*x2+y2*y2));
	
	if(angle < 0.0f)return 1;
	return 0;
}

int main() {
	float ax,ay, bx,by, cx,cy, dx,dy;
	
	while( scanf("%f,%f,%f,%f,%f,%f,%f,%f",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy) + 1 ){
		
		if(
			isConvex(ax,ay,bx,by,cx,cy) |
			isConvex(bx,by,cx,cy,dx,dy) |
			isConvex(cx,cy,dx,dy,ax,ay) |
			isConvex(dx,dy,ax,ay,bx,by)
		)cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	
	return 0;
}