#include <iostream>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <functional>
#include <iomanip>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <typeinfo>
#define PI 3.14159265359
#define INF 99999999
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)
#define pb push_back
#define mp make_pair
typedef long long ll;
using namespace std;
typedef pair<int, int> P;

#define EPS 1e-10
#define equals(a, b) (fabs((a) - (b)) < EPS)

class Point {
	public:
	double x, y;

	Point(double x = 0, double y = 0): x(x), y(y) {}

	Point operator + (Point p) { return Point(x + p.x, y + p.y); }
	Point operator - (Point p) { return Point(x - p.x, y - p.y); }
	Point operator * (double a) { return Point(a * x, a * y); }
	Point operator / (double a) { return Point(x / a, y / a); }

	double abs() { return sqrt(norm()); }
	double norm() { return x * x + y * y; }

	bool operator < (const Point &p) const {
		return x != p.x ? x < p.x : y < p.y;
	}

	bool operator == (const Point &p) const {
		return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
	}
};

typedef Point Vector;

double cross(Vector a, Vector b) {
	return a.x*b.y - a.y*b.x;
}

double xa, ya, xb, yb, xc, yc, xd, yd;
char comma;

int main()
{
	while (cin>>xa>>comma>>ya>>comma>>xb>>comma>>yb>>comma>>xc>>comma>>yc>>comma>>xd>>comma>>yd)
	{
		Point a(xa, ya);
		Point b(xb, yb);
		Point c(xc, yc);
		Point d(xd, yd);

		Vector ab = b - a;
		Vector bc = c - b;
		Vector cd = d - c;
		Vector da = a - d;

		if (cross(ab, bc) > EPS)
		{
			//反時計回り
			if (cross(bc, cd) > EPS && cross(cd, da) > EPS && cross(da, ab) > EPS)
			{
				cout << "YES" << endl;
				continue;
			}
		} else if (cross(ab, bc) < -EPS) {
			//時計回り
			if (cross(bc, cd) > -EPS && cross(cd, da) > -EPS && cross(da, ab) > -EPS)
			{
				cout << "YES" << endl;
				continue;
			}
		}

		cout << "NO" << endl;
	}
	
	return 0;
}