#include <complex>
#include <stdio.h>
#include <math.h>
using namespace std;

// _ÀWð^Æ·é
typedef complex<double> P;
// ÎÌè`
#define PI 3.1415926535898

// e·éë·Ã
#define EPS (1e-10)
//XYÀW
#define X real()
#define Y imag()

//QÂÌdouble^Ìlªµ¢©Ç¤©
bool equal(double a, double b){
	return (fabs( a-b ) < EPS)? true : false ;
}
	
// Op`NX
class Triangle{

private:
	//Op`ÌR_ÌÀW
	P a, b, c;
	//Op`ÌRÓÌ·³
	double edgeA,edgeB,edgeC;
	//Op`ÌRpÌå«³(WA)
	double angleA,angleB,angleC;
	//]·è©çRÂÌpxðßéÖ
	double LawOfCosines(double a,double b, double c){
		return acos( (b*b+c*c-a*a) / (2.0*b*c) );
	}
	

public:
	//RXgN^(RÂÌ_ÆÓÆpxðú»)
	Triangle(P p1, P p2, P p3){
		a = p1;
		b = p2;
		c = p3;
		edgeB = abs(c-a);
		edgeA = abs(b-c);
		edgeC = abs(a-b);
		angleA = LawOfCosines(edgeA,edgeB,edgeC);
		angleB = LawOfCosines(edgeB,edgeC,edgeA);
		angleC = LawOfCosines(edgeC,edgeA,edgeB);
	}
	double getAngleA(){//pAÌpxðÏ¦·
		return angleA;
	}
	double getAngleB(){//pBÌpxðÏ¦·
		return angleB;
	}
	double getAngleC(){//pCÌpxðÏ¦·
		return angleC;
	}
};

int main(){
	double xa, xb, xc, xd, ya, yb, yc, yd, angleA, angleB, angleC, angleD;

	while( scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != EOF ){
		P a( xa , ya );
		P b( xb , yb );
		P c( xc , yc );
		P d( xd , yd );
		Triangle Tr1(a,b,c);
		Triangle Tr2(a,d,c);
		angleA = Tr1.getAngleA() + Tr2.getAngleA();
		angleC = Tr1.getAngleC() + Tr2.getAngleC();
		angleB = Tr1.getAngleB() ;
		angleD = Tr2.getAngleB() ;
		
		if( angleA<=PI && angleB<=PI && angleC<=PI && angleD<=PI ){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}

	return 0;
}