#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
#include <bitset>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef complex<double> Point;

#define PI acos(-1.0)
#define EPS 1e-10
const ll INF = 1e9 + 7;
const ll MOD = 1e9 + 7;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )
#define fi first
#define se second

double cross(Point a, Point b) {
	return (a.real() * b.imag() - a.imag() * b.real());
}

char c;
double x[4], y[4];
Point p[4];

int main(){
	while (cin >> x[0] >> c >> y[0] >> c >> x[1] >> c >> y[1] >> c >>
		x[2] >> c >> y[2] >> c >> x[3] >> c >> y[3]){
		REP(i, 4)p[i] = { x[i], y[i] };
		if (cross(p[0] - p[2], p[0] - p[1])*cross(p[0] - p[2], p[0] - p[3]) > 0){
			cout << "NO" << endl;
			continue;
		}
		if (cross(p[1] - p[3], p[1] - p[0])*cross(p[1] - p[3], p[1] - p[2]) > 0){
			cout << "NO" << endl;
			continue;
		}
		cout << "YES" << endl;
	}
}