#include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>

using namespace std;

#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) (EQ((a).real(),(b).real()) && EQ((a).imag(),(b).imag()))

typedef complex<double> P;
typedef long long ll;

const int MAX_SIZE = 10000;

double dot(P a, P b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}
double cross(P a, P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
using namespace std;

int main(){

	double x[4];
	double y[4];
	char cm;
	while(cin>>x[0]){
		cin>>cm;
		cin>>y[0];
		for(int i = 1; i < 4; i++){
			cin>>cm>>x[i]>>cm>>y[i];
		}
		// ツつサツづェツつシツづェツづ個角ツづ個角ツ度ツづーツ計ツ算ツつオツ、180ツ度ツづーツ越ツつヲツづゥツ角ツ度ツつェツ堕カツ催敖つキツづェツづ篠、ツつュツづ堋づアツづつ「ツづゥ
		complex<double> A1(x[1]-x[0],y[1]-y[0]);
		complex<double> A2(x[3]-x[0],y[3]-y[0]);
		complex<double> B1(x[2]-x[1],y[2]-y[1]);
		complex<double> B2(x[0]-x[1],y[0]-y[1]);
		complex<double> C1(x[3]-x[2],y[3]-y[2]);
		complex<double> C2(x[1]-x[2],y[1]-y[2]);
		complex<double> D1(x[0]-x[3],y[0]-y[3]);
		complex<double> D2(x[2]-x[3],y[2]-y[3]);
		if(cross(A1,A2)<0||cross(B1,B2)<0||cross(C1,C2)<0||cross(D1,D2)<0){
			cout<<"NO"<<endl;
		}
		else
			cout<<"YES"<<endl;
	}

	return 0;
}