#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

struct point
{
	double x;
	double y;
	point()
	{
		x = 0.0;
		y = 0.0;
	}
	point(double a, double b)
	{
		x = a;
		y = b;
	}
};
//直線-線分の交差判定
//s
bool c_s_cross(point s, point t, point u, point v)
{
	double tc = (s.x - t.x)*(u.y - s.y) + (s.y - t.y)*(s.x - u.x);
	double td = (s.x - t.x)*(v.y - s.y) + (s.y - t.y)*(s.x - v.x);

	if(tc*td < 0)
	{
		return true;
	}
	else
	{
		return false;
	}
}

bool judge(point a, point b, point c, point d)
{
	if(c_s_cross(a, c, b, d) && c_s_cross(b, d, a, c))
	{
		return true;
	}
	else
	{
		return false;
	}
}

int main()
{
	point a, b, c, d;

	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a.x ,&a.y ,&b.x ,&b.y ,&c.x ,&c.y ,&d.x ,&d.y))
	{
		//printf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",a.x ,a.y ,b.x ,b.y ,c.x ,c.y ,d.x ,d.y);
		cout << (judge(a, b, c, d)?"YES":"NO") << endl;
	}
}