#include <iostream>
#include <vector>
#include <string>
#include <sstream>

class Point2D {
	double m_x, m_y;
public:
	Point2D(double x, double y) :
		m_x(x), m_y(y)
	{}
	Point2D(const Point2D &p) :
		m_x(p.x()), m_y(p.y())
	{}
	double x() const { return m_x; }
	double y() const { return m_y; }
};

Point2D operator-(const Point2D &a, const Point2D &b) {
	return Point2D(a.x() - b.x(), a.y() - b.y());
}

double cross(const Point2D &a, const Point2D &b) {
	return a.x() * b.y() - a.y() * b.x();
}

bool isIntersected(const Point2D &p1, const Point2D &p2, const Point2D &q1, const Point2D &q2) {
	const Point2D p = p2 - p1, q = q2 - q1;
	return cross(p, q1 - p1) * cross(p, q2 - p1) <= 0 && cross(q, p1 - q1) * cross(q, p2 - q1) <= 0;
}

std::vector<std::string> split(std::string &str, char delim) {
	std::vector<std::string> result;
	std::istringstream is(str);
	std::string buf;
	while (getline(is, buf, delim)) {
		result.push_back(buf);
	}
	return result;
}

bool inputDataSet(std::vector<Point2D> *p) {
	std::string line;
	if (!getline(std::cin, line)) { return false; }
	const std::vector<std::string> tokens(split(line, ','));
	if (tokens.size() != 8) { return false; }
	std::vector<double> ds;
	for (std::vector<std::string>::const_iterator it = tokens.begin(); it != tokens.end(); ++it) {
		std::istringstream is(*it); double x;
		is >> x;
		ds.push_back(x);
	}
	p->clear();
	for (int i = 0; i < 8; i += 2) {
		p->push_back(Point2D(ds[i], ds[i + 1]));
	}
	return true;
}

int main() {
	std::vector<Point2D> p;
	while (inputDataSet(&p)) {
		if (p.size() < 4) { continue; }
		std::cout << (isIntersected(p[0], p[2], p[1], p[3]) ? "YES" : "NO") << std::endl;
	}
	return 0;
}