import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.container;
import std.datetime;

immutable EPS = 10e-12;

double solve(cdouble a, cdouble b, cdouble c) {
	return (a.re - b.re) * (c.im - b.im) - (a.im - b.im) * (c.re - b.re);
}

void main()
{
	foreach (line; stdin.byLine) {
		auto x = line.chomp.split(",").map!(to!double);
		cdouble[4] a;
		a[0] = x[0] + x[1] * 1i;
		a[1] = x[2] + x[3] * 1i;
		a[2] = x[4] + x[5] * 1i;
		a[3] = x[6] + x[7] * 1i;
		
		int cnt;
		foreach (i; 0..4) {
			if (solve(a[i%4], a[(i+1)%4], a[(i+2)%4]) > EPS) cnt++;
		}
		if (cnt % 4) writeln("NO");
		else writeln("YES");
	}
}