#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>

typedef long long Int;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
#define REPS(a,i,n) for(int i = a ; i < n ; ++i)
using namespace std;

vector<pair<double, double>> point(4);

typedef pair<double, double> P;

int dot(P a, P b){
	return a.first*b.second - a.second*b.first;
}

bool In(P a, P b, P c, P p){
	auto ab = P(b.first - a.first, b.second - a.second);
	auto bc = P(c.first - b.first, c.second - a.second);
	auto ca = P(a.first - c.first, a.second - c.second);
	auto ap = P(p.first - a.first, p.second - a.second);
	auto bp = P(p.first - b.first, p.second - b.second);
	auto cp = P(p.first - c.first, p.second - c.second);

	return (dot(ab, bp) > 0 && dot(bc, cp) > 0 && dot(ca, ap) > 0 || dot(ab, bp) < 0 && dot(bc, cp) < 0 && dot(ca, ap) < 0);

}

int main(){
	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &point[0].first, &point[0].second, &point[1].first, &point[1].second, &point[2].first, &point[2].second, &point[3].first, &point[3].second) != EOF){
		vector<int> aa = { 0, 1, 2, 3 };
		bool f = true;

		do{
			f &= !In(point[aa[0]], point[aa[1]], point[aa[2]], point[aa[3]]);
		} while (next_permutation(aa.begin(), aa.end()));

		cout << (f?"YES":"NO") << endl;
	}

	return 0;
}