#include<iostream>
#include<complex>
#define eps 10e-9
using namespace std;
typedef complex<double> p;

double cross(p x,p y)
{
	return x.real()*y.imag()-x.imag()*y.real();
}

int main()
{
	p a,b,c,d;
	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a.real(),&a.imag(),&b.real(),&b.imag(),&c.real(),&c.imag(),&d.real(),&d.imag())!=EOF) 
	{
		double tmp=1;
		tmp*=cross(b-a,d-a);
		bool flag=true;
		if(tmp*cross(c-b,a-b)<-eps||tmp*cross(d-c,b-c)<-eps||tmp*cross(a-d,c-d)<-eps) flag=false;
		cout<<(flag?"YES":"NO")<<endl;
	}
  return 0;
}