#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

double distance(double x0, double y0, double x1, double y1)
{
	double x = x1 - x0;
	double y = y1 - y0;

	return sqrt(x * x + y * y);
}

double angle(double b, double c, double a)
{
	return acos((b * b + c * c - a * a) / (2 * b * c)) * (180 / M_PI);
}

int main()
{
	string s;
	for (; getline(cin, s);)
	{
		stringstream ss;
		ss << s;

		vector<double> x(4);
		vector<double> y(4);

		for (int i = 0; i < 4; i++)
		{
			ss >> x.at(i);
			ss.ignore();

			ss >> y.at(i);
			ss.ignore();
		}

		double a = distance(x.at(0), y.at(0), x.at(1), y.at(1));
		double b = distance(x.at(1), y.at(1), x.at(2), y.at(2));
		double c = distance(x.at(2), y.at(2), x.at(3), y.at(3));
		double d = distance(x.at(3), y.at(3), x.at(0), y.at(0));


		double ang0 = angle(a, b, distance(x.at(0), y.at(0), x.at(2), y.at(2)));
		double ang1 = angle(b, c, distance(x.at(1), y.at(1), x.at(3), y.at(3)));
		double ang2 = angle(c, d, distance(x.at(2), y.at(2), x.at(0), y.at(0)));
		double ang3 = angle(d, a, distance(x.at(3), y.at(3), x.at(1), y.at(1)));

		if (ang0 + ang1 + ang2 + ang3 < 360.0)
		{
			cout << "NO" << endl;
		}
		else
		{
			cout << "YES" << endl;
		}
	}
}
