#include <iostream>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <climits>
#include <complex>
 
#define REP(i,b,n) for(int i=b;i<n;++i)
#define REPR(i,b,n) for(int i=n-1;i>=b;--i)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define NCLR(mat) memset(mat, -1, sizeof(mat))
#define EACH(i, c) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define BIT(n, b) ((n>>b) & 1)
#define PI acos(-1.0)

using namespace std;

static const double EPS = 1e-9;
typedef complex<double> p;
typedef pair<int, int> pii;
typedef long long ll;

double cross(p a, p b){
	
	return (a.real() * b.imag() - a.imag() * b.real());
}

string solve(vector<p> vc){

	bool sgo;
	
	for(int i=0; i<vc.size(); ++i){
		
		bool sg = cross(vc[i] - vc[(i+2)%vc.size()], vc[(i+1)%vc.size()] - vc[(i+2)%vc.size()]) > 0;
		
		if(i==0){
			sgo = sg;
			continue;
		}
		
		if(sgo ^ sg)
			return "NO";
	}
	
	return "YES";
}
	

int main(){

	double x[4], y[4];
	char c;
	vector<p> lct;
	
	while(cin >> x[0] >>c>> y[0] >>c>> x[1] >>c>> y[1] >>c>>
			x[2] >>c>> y[2] >>c>> x[3] >>c>> y[3], !cin.eof()){
			
		for(int i=0; i<4; ++i){
			lct.push_back(p(x[i]+100.0, y[i]+100.0));
		}
		
		cout << solve(lct) << endl;
	}
	
	return 0;
}