#include <bits/stdc++.h>  

using namespace std;

#define int long long
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF 1e9
#define LINF 1e18

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
typedef pair<P, P> PP;

const int MOD = 1e9 + 7;
const int dy[]={0, 0, 1, -1};
const int dx[]={1, -1, 0, 0};

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

const double EPS = 1e-10;

double add(double a, double b) {
	if(abs(a + b) < EPS * (abs(a) + abs(b))) return 0;
	return a + b;
}

struct Point {
	double x, y;
	Point() {}
	Point(double x, double y) : x(x), y(y) {
	}
	Point operator + (Point p) {
		return Point(add(x, p.x), add(y, p.y));
	}
	Point operator - (Point p) {
		return Point(add(x, -p.x), add(y, -p.y));
	}
	Point operator * (double d) {
		return Point(x * d, y * d);
	}
	double dot(Point p) {
		return add(x * p.x, y * p.y);
	}
	double det(Point p) {
		return add(x * p.y, -y * p.x);
	}
};

bool cmp_x(const Point& p, const Point& q) {
	if(p.x != q.x) return p.x < q.x;
	return p.y < q.y;
}

vector<Point> convex_hull(Point *ps, int n) {
	sort(ps, ps + n, cmp_x);
	int k = 0;
	vector<Point> qs(2 * n);

	for(int i = 0; i < n; ++i) {
		while(k > 1 && (qs[k - 1] - qs[k - 2]).det(ps[i] - qs[k - 1]) <= 0) --k;
		qs[k++] = ps[i];
	}
	for(int i = n - 2, t = k; i >= 0; --i) {
		while(k > t && (qs[k - 1] - qs[k - 2]).det(ps[i] - qs[k - 1]) <= 0) --k;
		qs[k++] = ps[i];
	}
	qs.resize(k - 1);
	return qs;
}

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    double x[4], y[4];
    while((scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3])) != EOF) {
        Point p[4];
        for(int i = 0; i < 4; ++i) {
            p[i].x = x[i]; p[i].y = y[i];
        }
        vector<Point> ps = convex_hull(p, 4);
        printf("%s\n", (ps.size() == 4) ? "YES" : "NO");
    }
    return 0;
}
