#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
static const double PI=6*asin(0.5);

double x[5],y[5];
char tmp;
double h[6];
double ang[8];//0:bac 1:bca 2:acd 3:cad 4:cba 5:cdb 6:bda 7:dba


int main(){
	while(cin>>x[0]>>tmp>>y[0]){
		bool flag=true;
		rep(i,3){
			cin>>tmp>>x[i+1]>>tmp>>y[i+1];
		}
		x[4] = x[0]; y[4] = y[0];
		rep(i,4){
			double X = x[i+1]-x[i],Y = y[i+1]-y[i];
			h[i] = sqrt(X*X+Y*Y);
			//cout << "h["<<i<<"] = "<<h[i]<<endl;
		}
		//cout<<acos(0.5)<<endl;
		h[4] = sqrt((x[2]-x[0])*(x[2]-x[0])+(y[2]-y[0])*(y[2]-y[0]));
		h[5] = sqrt((x[3]-x[1])*(x[3]-x[1])+(y[3]-y[1])*(y[3]-y[1]));
		ang[0] = acos((h[0]*h[0]+h[4]*h[4]-h[1]*h[1])/(2*h[0]*h[4]));
		ang[1] = acos((h[1]*h[1]+h[4]*h[4]-h[0]*h[0])/(2*h[1]*h[4]));
		ang[2] = acos((h[2]*h[2]+h[4]*h[4]-h[3]*h[3])/(2*h[2]*h[4]));
		ang[3] = acos((h[3]*h[3]+h[4]*h[4]-h[2]*h[2])/(2*h[3]*h[4]));
		ang[4] = acos((h[1]*h[1]+h[5]*h[5]-h[2]*h[2])/(2*h[1]*h[5]));
		ang[5] = acos((h[2]*h[2]+h[5]*h[5]-h[1]*h[1])/(2*h[2]*h[5]));
		ang[6] = acos((h[5]*h[5]+h[3]*h[3]-h[0]*h[0])/(2*h[5]*h[3]));
		ang[7] = acos((h[0]*h[0]+h[5]*h[5]-h[3]*h[3])/(2*h[0]*h[5]));
		//cout << (h[0]*h[0]+h[4]*h[4]-h[1]*h[1])/(2*h[0]*h[4])<<endl;
		//rep(i,4) cout<<ang[i]<<endl;
		//cout<<2*ang[0]<<" "<<PI<<endl;
		if(PI>(ang[0]+ang[3])&&PI>ang[1]+ang[2]){
			
		}
		else{
			flag = false;
		}
		if(PI>(ang[4]+ang[7])&&PI>ang[5]+ang[6]){
		}
		else{
			flag = false;
		}
		if(flag) cout<<"YES\n";
		else cout<<"NO\n";
		
	}
	return 0;
}