#include <iostream>
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapii map<int, int>
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()
#define minit(a, i) memset(a, i, sizeof(a));

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

typedef long long ll;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }



struct Point2D { 
	double x, y;
	Point2D (double a=0, double b=0) { x=a; y=b; }
};

typedef Point2D Vector2D;

double dist2D(const Point2D& a, const Point2D& b) { return sqrt( (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) ); }

Vector2D sub_vector2D(const Vector2D& a, const Vector2D& b) {
	Vector2D ret;
	ret.x = a.x - b.x; ret.y = a.y - b.y;
	return ret;
}

double cross_product(const Vector2D& a, const Vector2D& b) { return a.x*b.y - a.y*b.x; }

double inner_product(const Vector2D& a, const Vector2D& b) { return a.x*b.x + a.y*b.y; }

bool point_in_triangle_2D(const Point2D& a, const Point2D& b, const Point2D& c, const Point2D& p) {
	Vector2D ab = sub_vector2D(b, a); Vector2D bp = sub_vector2D(p, b);
	Vector2D bc = sub_vector2D(c, b); Vector2D cp = sub_vector2D(p, c);
	Vector2D ca = sub_vector2D(a, c); Vector2D ap = sub_vector2D(p, a);
	double c1 = cross_product(ab, bp), c2 = cross_product(bc, cp), c3 = cross_product(ca, ap);
	return ( (c1>0 && c2>0 && c3>0) || (c1<0 && c2<0 && c3<0) );
}

struct Circle {
	Point2D c; 
	double r;
	Circle (double a=0, double b=0, double rr=0) { c.x=a; c.y=b; r=rr; }
};

bool point_in_circle(const Point2D& p, const Circle& t) {
	double dist = dist2D(p, t.c);
	return (dist <= t.r);
}

int circle_intersect(const Circle& a, const Circle& b) {
	double dist = dist2D(a.c, b.c);
	if (a.r + b.r < dist) return 0;	// no
	if (dist + b.r < a.r) return 2;	// b in a
	if (dist + a.r < b.r) return -2;	// a in b
	return 1;	// collision
}

struct Polygon {
	vector<Point2D> pset;
	Polygon (int size=3) { pset.assign(size, Point2D(0,0)); }
};

bool point_in_polygon(const Polygon& pol, const Point2D& p) {
	int cnt = 0;
	int n = (int)pol.pset.size();
	
	for (int i = 1; i<=n; i++) {
		Point2D p0 = pol.pset[i-1], p1 = pol.pset[i%n];
		bool flag0x = (p.x <= p0.x), flag0y = (p.y <= p0.y);
		bool flag1x = (p.x <= p1.x), flag1y = (p.y <= p1.y);
		
		if (flag0y != flag1y) {
			if ( (flag0x == flag1x) && flag0x) {
				cnt += (flag0y ? -1 : 1);
			} else if (p.x <= ( p0.x+(p1.x-p0.x)*(p.y-p0.y)/(p1.y-p0.y) ) ) {
				cnt += (flag0y ? -1 : 1);
			}
		}
	}
	
	return (cnt!=0);
}

int MAX = 4;

int main() {
	Polygon p(MAX);
	char c;
	while (cin>>p.pset[0].x) {
		cin >> c >> p.pset[0].y;
		for_(i, 1, MAX) cin >> c >> p.pset[i].x >> c >> p.pset[i].y;
		
		Polygon q(0);
		Point2D r;
		bool flag = true;
		for_(i, 0, MAX) {
			r = p.pset[i];
			q.pset.clear();
			for_(j, 0, MAX) {
				if (i==j) continue;
				q.pset.pb(p.pset[j]);
				if (point_in_polygon(q, r)) flag = false;
			}
		}
		
		if (flag) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

Measured memory_bytes: 1220