#include<iostream>
#include<cstdio>
#define _USE_MATH_DEFINES
#include<cmath>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;


#define INF 1e+10
#define EPS 1e-10
#define EQ(a,b) (abs(a-b)<EPS)

//誤差を考慮して足し算
double add(double a,double b){
	if(abs(a+b) < EPS*(abs(a)+abs(b)))return 0;
	return a+b;
}
struct P{//2次元ベクトル
	double x,y;
	P(){}
	P(double x,double y):x(x),y(y){}
	P operator + (P p)const{
		return P(add(x,p.x),add(y,p.y));
	}
	P operator - (P p)const{
		return P(add(x,-p.x),add(y,-p.y));
	}
	P operator * (double d)const{
		return P(x*d,y*d);
	}
	P operator / (double d)const{
		return P(x/d,y/d);
	}
	double dot(P p)const{//内積
		return add(x*p.x,y*p.y);
	}
	double det(P p)const{//外積
		return add(x*p.y,-y*p.x);
	}
	bool equal(P p)const{
		return (x-p.x)*(x-p.x)+(y-p.y)*(y-p.y) < EPS*EPS;
	}
	double norm()const{
		return sqrt(x*x+y*y);
	}
};


int ccw(P a, P b, P c){
	b = b-a;
	c = c-a;
	if (b.det(c) > 0)   return +1;       // counter clockwise
	if (b.det(c) < 0)   return -1;       // clockwise
	if (b.dot(c) < 0)     return +2;       // c--a--b on line
	if (b.norm() < c.norm()) return -2;       // a--b--c on line
	return 0;
}

int main(){
	P a,b,c,d;
	char _;
	while(cin>>a.x>>_>>a.y>>_>>b.x>>_>>b.y>>_>>c.x>>_>>c.y>>_>>d.x>>_>>d.y){
		int f=0,r;
		r=ccw(a,b,c);
		if(r==-1)f|=1;
		else if(r==1)f|=2;
		r=ccw(b,c,d);
		if(r==-1)f|=1;
		else if(r==1)f|=2;
		r=ccw(c,d,a);
		if(r==-1)f|=1;
		else if(r==1)f|=2;
		r=ccw(d,a,b);
		if(r==-1)f|=1;
		else if(r==1)f|=2;
		if(f!=3)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}