#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


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

int main() {
	double x[4], y[4];
	char c;
	for (; cin >> x[0] >> c >> y[0] ; ) {
		rep (i, 3) cin >> c >> x[i + 1] >> c >> y[i + 1];
		double a = 0, b = 0;
		double s = 0.0;
		rep (i, 4) s += det(P(x[i], y[i]), P(x[(i + 1) % 4], y[(i + 1) % 4])) / 2.0;
		s = fabs(s);
		double sub_s = 0;
		rep(j, 4) {
			double ss = 0.0;
			rep(i, 4) if (i != j) {
				int idx = (i + 1) % 4;
				if(i + 1 == j) idx = (i + 2) % 4;
				ss += det(P(x[i], y[i]), P(x[idx], y[idx])) / 2.0;
			}
			ss = fabs(ss);
			sub_s = max(sub_s, ss);
		}
		cout << (s == sub_s ? "YES" : "NO") << endl;
	}
	return 0;
}