#include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

vector<string> split_naive(const string &s, char delim) {
	vector<string> elems;
	string item;
	for(char ch:s){
		if(ch==delim){
			if(!item.empty()) elems.push_back(item);
			item.clear();
		}
		else{
			item += ch;
		}
	}
	if(!item.empty()) elems.push_back(item);
	return elems;
}

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);
	
	string S;
	while(cin>>S){
		auto SS = split_naive(S,',');
		double X[4],Y[4];
		for(int i=0;i<4;i++){
			sscanf(SS[2*i].c_str(),"%lf",&X[i]);
			sscanf(SS[2*i+1].c_str(),"%lf",&Y[i]);
		}

		array<double,4> outer;
		REP(i,4){
			double VX[2],VY[2],VN[2];
			VX[0] = X[(i+1)%4]-X[i];
			VY[0] = Y[(i+1)%4]-Y[i];
			VN[0] = hypot(VX[0],VY[0]);
			VX[0] /= VN[0];
			VY[0] /= VN[0];

			VX[1] = X[(i+2)%4]-X[(i+1)%4];
			VY[1] = Y[(i+2)%4]-Y[(i+1)%4];
			VN[1] = hypot(VX[1],VY[1]);
			VX[1] /= VN[1];
			VY[1] /= VN[1];

			outer[i] = VX[0]*VY[1]-VY[0]*VX[1];
		}
		if(all_of(ALL(outer),[](double c){return c>0;}) || all_of(ALL(outer),[](double c){return c<0;})){
			out("YES");
		}
		else out("NO");
	}
	return 0;
}
