#include<iostream>
#include<complex>
#include<algorithm>
using namespace std;

typedef complex<double> P;

// ?¨±?????????????????
#define EPS (1e-5)
// 2??????????????????????????????????????????
#define EQ(a,b) (abs((a)-(b)) < EPS)
// 2??????????????????????????????????????????
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )

// ?????? (cross product) : a??b = |a||b|sin??
double cross(P a, P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
// ????§???¢(v1,v2,v3)????????????v?????????????????????
bool inTriangle(P v1,P v2,P v3,P v){
	if(cross(v2-v1,v-v1)<-EPS&&cross(v3-v2,v-v2)<-EPS&&cross(v1-v3,v-v3)<-EPS)return true;
	else if(cross(v2-v1,v-v1)>EPS&&cross(v3-v2,v-v2)>EPS&&cross(v1-v3,v-v3)>EPS)return true;
	return false;
}

P data[4];
bool input(){
	char c;
	
	for(int i=0;i<4;i++){
		if(!(cin>>data[i].real()))return false;
		cin>>c;
		cin>>data[i].imag();
		if(i<3)cin>>c;
	}
	return true;
}
int n[4]={0,1,2,3};
int main(){
	while(input()){
		do{
			if(inTriangle(data[n[0]],data[n[1]],data[n[2]],data[n[3]])){
				cout<<"NO"<<endl;
				return 0;
			}
		}while(next_permutation(n,n+4));
		cout<<"YES"<<endl;
	}
	
}