#include<iostream>
#include<cmath>
int main()
{
	while (true)
	{
		double xa, ya, xb, yb, xc, yc, xd, yd;
		char foo;
		std::cin >> xa >> foo >> ya >> foo >> xb >> foo >> yb >> foo >> xc >> foo >> yc >> foo >> xd >> foo >> yd;
		if (std::cin.eof())
		{
			break;
		}
		const double A_C = hypot(xa - xc, ya - yc);
		const double B_D = hypot(xb - xd, yb - yd);
		const double AC_B = abs(((yc - ya)*(xb - xc) - (xc - xa)*(yb - yc)) / hypot(yc - ya, xc - xa));
		const double BD_A = abs(((yd - yb)*(xa - xd) - (xd - xb)*(ya - yd)) / hypot(yd - yb, xd - xb));
		std::cout << (A_C > BD_A&&B_D > AC_B ? "YES" : "NO") << std::endl;
	}
	return 0;
}
