#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;
inline int toInt(string s){int v;istringstream i(s);i>>v;return v;}
template<class T> inline string toString(T x){ostringstream o;o<<x;return o.str();}
template<class T> void pv(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}
const int INF = 1000000000;
const double PI = acos(-1.0), EPS = 1e-10;

typedef complex<double> P;

double CROSS(const P& a, const P& b) {
	return imag(conj(a) * b);
}

int CCW(const P& a, const P& b) {
	if(CROSS(a, b) > EPS) return 1;
	if(CROSS(a, b) < -EPS) return -1;
	return 0;
}

int main() {
	vector<P> v(4);
	for(string line; getline(cin, line);) {
		rep(i,line.length()) if(line[i] == ',') line[i] = ' ';
		istringstream is(line);
		for(int i = 0; i < 4; i++) {
			is >> v[i].real() >> v[i].imag();
		}

		int ccw[4];
		
		for(int i = 0; i < 4; i++) {
			int cur = i % 4;
			int nc = (i + 1) % 4;
			int nnc = (i + 2) % 4;
			ccw[i] = CCW(v[nc] - v[cur], v[nnc] - v[nc]);
		}
		
#if 0
		debug(v[0]);
		debug(v[1]);
		debug(v[2]);
		debug(v[3]);
#endif

#if 0
		debug(ccw[0]);
		debug(ccw[1]);
		debug(ccw[2]);
		debug(ccw[3]);
#endif
		
		bool f = true;
		for(int i = 0; i < 4; i++) {
			if(ccw[i] != ccw[(i+1)%4]) f = false;
		}
		
		cout << (f ? "YES" : "NO") << endl;
	}
	return 0;
}