#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }
const double EPS=1e-10;
int sig(double r){return (r<-EPS)?-1:(r>EPS)?:0;}
struct Pt{
	double x,y;
	Pt(){}
	Pt(double x,double y) : x(x),y(y){}
	Pt operator+(const Pt &a)const{return Pt(x+a.x,y+a.y);}
	Pt operator-(const Pt &a)const{return Pt(x-a.x,y-a.y);}
	Pt operator*(const Pt &a)const{return Pt(x*a.x-y*a.y,x*a.y+y*a.x);}
	double det(const Pt &a)const{return x*a.y-y*a.x;}
};
double tri(Pt a,Pt b,Pt c){return (b-a).det(c-a);}
bool iSSstrict(Pt a,Pt b,Pt c,Pt d){
	return ((sig(tri(a,b,c)))*sig(tri(a,b,d))<0&&(sig(tri(c,d,a)))*sig(tri(c,d,b))<0);
}
int main() {
	Pt a,b,c,d;
	for(;~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf\n",&(a.x),&(a.y),&(b.x),&(b.y),&(c.x),&(c.y),&(d.x),&(d.y));){
		cout<<(iSSstrict(a,b,c,d)||iSSstrict(a,c,b,d)||iSSstrict(a,d,c,b)?"YES":"NO")<<endl;
	}
	return 0;
}