#include <iostream>
using namespace std;

int main(){
	char trash;
	double x[4], y[4];
	while(cin >> x[0] >> trash >> y[0]){
		double p, q, r;
		for(int i = 1; i < 4; i++){
			cin >> trash >> x[i] >> trash >> y[i];
		}
		p = ((y[1]-y[0])*(x[3]-x[0])/(x[1]-x[0]))+y[0];
		q = ((y[2]-y[1])*(x[3]-x[1])/(x[2]-x[1]))+y[1];
		r = ((y[2]-y[0])*(x[3]-x[0])/(x[2]-x[0]))+y[0];
		if(x[0] == x[2]){
			if(x[0] > x[1]){
				if(x[0] > x[3]){
					cout << "NO" << endl;
				}
				else{
					if((p < y[3] && q > y[3]) || (p > y[3] && q < y[3])){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
			else{
				if(x[0] < x[3]){
					cout << "NO" << endl;
				}
				else{
					if((p < y[3] && q > y[3]) || (p > y[3] && q < y[3])){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
		}
		else if(x[0] == x[1]){
			if(x[0] > x[2]){
				if(x[0] < x[2]){
					cout << "NO" << endl;
				}
				else{
					if(q > y[3]){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
			else{
				if(x[0] > x[2]){
					cout << "NO" << endl;
				}
				else{
					if(q > y[3]){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
		}
		else if(x[1] == x[2]){
			if(x[0] > x[1]){
				if(x[1] > x[3]){
					cout << "NO" << endl;
				}
				else{
					if(p < y[3]){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
			else{
				if(x[1] < x[3]){
					cout << "NO" << endl;
				}
				else{
					if(p < y[3]){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
		}
		else{
			if(r > y[1]){
				if(r > y[3]){
					cout << "NO" << endl;
				}
				else{
					if((p < y[3] && q > y[3]) || (p > y[3] && q < y[3])){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
			else{
				if(r < y[3]){
					cout << "NO" << endl;
				}
				else{
					if((p < y[3] && q > y[3]) || (p > y[3] && q < y[3])){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}	
			}
		}