#include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <sstream>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define bitcount(b) __builtin_popcount(b)

struct P{double x,y;};


double euc(P a,P b){
	a.x-=b.x;
	a.y-=b.y;
	return sqrt( a.x * a.x + a.y * a.y );
}

double tri(P a,P b,P c){	
	a.x -= c.x, a.y -= c.y;
	b.x -= c.x, b.y -= c.y;
	c.x -= c.x; c.y -= c.y;
	
	return fabs(b.x * a.y - a.x * b.y) / 2.0;
}

int main(){
	vector<P> d(4);
	string line;
	while( getline(cin,line) ){
		while(~line.find(","))line[line.find(",")] = ' ';
		stringstream ss(line);
		rep(i,4){
			if( ss >> d[i].x >> d[i].y );
			else return 0;
		}
		double sum = 0;
		
		sum = tri(d[0],d[1],d[2]) + tri(d[0],d[2],d[3]);
		
		bool flag = true;
		
		rep(i,1<<4){
		
			if(bitcount(i) != 3)continue;
			
			vector<P> t;
			
			rep(j,4){
				if( i & (1<<j) ){
					t.push_back(d[j]);	
				}
			}
			if( tri(t[0],t[1],t[2]) > sum ){
				flag = false;
			}
		}
		cout << (flag?"YES":"NO") << endl;
	}
}