#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define rep(i,n) for(int i = 0;i < n;i++)
#define P(p) cout<<(p)<<endl;
#define pi 3.1415926535
using namespace std;
typedef long long ll;
int dx[] = { 0, 1, 0, -1 };
int dy[] = { -1, 0, 1, 0 };

unsigned long long sttoi(std::string str) {
	unsigned long long ret;
	std::stringstream ss; ss << str;
	ss >> ret;
	return ret;
}

ll gcd(ll a, ll b){
	if (b > a)swap(a, b); if (b == 0)return a; else{ return gcd(b, a%b); }
}

double rad(double ax,double ay,double bx,double by,double cx,double cy){
	double px, py, qx, qy;
	px = bx - ax;
	qx = bx - cx;
	py = by - ay;
	qy = by - cy;
	return (px*py + qx*qy) / (sqrt((px*px + qx*qx)*(py*py + qy*qy)));
}

void solve() {
	double x[4],y[4];
	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[0], &y[0], &x[1], &y[1], &x[2], &y[2], &x[3], &y[3]) != -1){
		double sum = 0.0;
		for (int i = 0; i < 4; i++){
			sum += acos(rad(x[i % 4], y[i % 4], x[i + 1 % 4], y[i + 1 % 4], x[i + 2 % 4], y[i + 2 % 4]));
		}
		if (sum < 2*pi){
			P("NO");
		}
		else{
			P("YES");
		}
	}
}

int main() {
	solve();
	return 0;
}